Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions nemo_gym/train_data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,14 @@ def validate_samples_and_aggregate_metrics(

if conflicting_fpaths:
conflicting_fpaths_str = "\n- ".join([""] + conflicting_fpaths)
raise ValueError(f"Found conflicting aggregate metrics that need to be corrected:{conflicting_fpaths_str}")
target_fpaths_str = "\n- ".join(
[""] + [fp.replace("_conflict.json", ".json") for fp in conflicting_fpaths]
)
raise ValueError(f"""
Found conflicting aggregate metrics that need to be corrected:{conflicting_fpaths_str}

This could be due to a change in how metrics are calculated, leading to outdated metrics. Try deleting the below file(s) and rerunning data preparation:{target_fpaths_str}
""")

return dict(dataset_type_to_aggregate_metrics)

Expand Down Expand Up @@ -606,7 +613,14 @@ def collate_samples(

if conflicting_fpaths:
conflicting_fpaths_str = "\n- ".join([""] + conflicting_fpaths)
raise ValueError(f"Found conflicting aggregate metrics that need to be corrected:{conflicting_fpaths_str}")
target_fpaths_str = "\n- ".join(
[""] + [fp.replace("_conflict.json", ".json") for fp in conflicting_fpaths]
)
raise ValueError(f"""
Found conflicting aggregate metrics that need to be corrected:{conflicting_fpaths_str}

This could be due to a change in how metrics are calculated, leading to outdated metrics. Try deleting the below file(s) and rerunning data preparation:{target_fpaths_str}
""")

final_fpaths_str = "\n- ".join([""] + [f"{type}: {fpath}" for type, fpath in final_fpaths.items()])
print(f"View your final data!{final_fpaths_str}")
Expand Down