Skip to content

Commit 12f02aa

Browse files
committed
style(regen): trim comments to the constraint they carry
Signed-off-by: Ranran Haoran Zhang <ranzhang@redhat.com>
1 parent e89dfcd commit 12f02aa

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

scripts/response_regeneration/script.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
with_retries,
2020
)
2121

22-
# Their turns carry image content parts, which the Chat API rejects, and the
23-
# output row has nowhere to put pixel data. Off-policy `prepare-data` takes them.
22+
# Image parts: the Chat API rejects them, and output rows keep no pixel data.
2423
MULTIMODAL_DATASETS = {"sharegpt4v_coco"}
2524
REGEN_DATASETS = [name for name in DATASET_CONFIGS if name not in MULTIMODAL_DATASETS]
2625

2726

2827
def _dataset_choice(name: str) -> str:
29-
"""Reject multimodal presets with a reason rather than a bare invalid choice."""
28+
"""Reject multimodal presets with a reason, not a bare invalid choice."""
3029
if name in MULTIMODAL_DATASETS:
3130
raise argparse.ArgumentTypeError(
3231
f"{name!r} is multimodal; on-policy regeneration does not support "
@@ -532,7 +531,6 @@ async def main():
532531
continue
533532

534533
turns = prepare_row(row, dataset_config)
535-
# prepare_row returns [] for filtered rows and unusable turns.
536534
if not turns:
537535
continue
538536

src/speculators/data_generation/configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class DatasetConfig:
2020
split: str
2121
filter_fn: Callable[[dict], bool] | None = None
2222
normalize_fn: Callable[[dict], dict] | None = None
23-
# Bare user-prompt fallback column for the response-regeneration script.
23+
# Bare user-prompt column, used when a row has no conversation.
2424
prompt_field: str | None = None
2525

2626

0 commit comments

Comments
 (0)