Ster/Docs

ster pairs remove

Remove one contrastive pair from a pair set by its zero-based index.

Invocation and purpose#

text
ster pairs remove --pairs <PAIRS> --index <INDEX>

Loads the set, drops the pair at --index, and writes the remaining pairs back in their existing order. No model is loaded.

Inputs and options#

InputRequiredMeaning
--pairs <PAIRS>yesExisting pair-set JSON.
--index <INDEX>yesZero-based position of the pair to remove, as reported by ster pairs inspect.

Output and state#

Rewrites the file as pretty-printed JSON with a trailing newline. Stdout is a pretty JSON document with path, the remaining pair_count, and removed carrying the index, positive, and negative of the pair that was dropped.

Refusals#

  • The set is loaded first, so the load refusals apply: failed to read pair set <PATH>, invalid pair set JSON in <PATH>, pair set <PATH> contains no pairs, and pair set <PATH> contains an empty positive or negative prompt.
  • An index at or past the end is refused as pair index <N> is outside the set's 0..<LAST> range; the bound is inclusive, matching the layer-range refusals, and the file is left untouched.
  • Removing the only remaining pair is refused as pair set <PATH> contains no pairs, because the write validates the set before it touches disk. The file on disk is left as it was.