You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Harbor targets store an absolute jsonl_fpath inside the checkout, so preparing again from another checkout fails #4979
What happens. Preparing the same Harbor target into the same output from a different Gym checkout fails in data preparation with "Found conflicting aggregate metrics". The only field that differs is the dataset's jsonl_fpath.
It shows up whenever a Harbor target runs again from a fresh checkout, for example:
gym eval resubmit of a Harbor run whose job driver installs Gym into a new temporary directory for every job (mktemp -d /tmp/gym-install-XXXXXX, nemo_gym/orchestration/executors/script_templates.py:233);
a Slurm requeue of such a job.
Why.
nemo_gym/tasks/harbor/materialize.py:122 writes the validation dataset as "jsonl_fpath": str(Path(rows_path).resolve()). rows_path is under the working directory, which is the checkout, so the stored path is absolute and contains the checkout's location.
collate_samples (nemo_gym/train_data_utils.py:1212) merges the dataset config into the aggregate metrics it saves next to the output.
The next preparation compares them (:1241) and raises (:1285) unless overwrite_metrics_conflicts is set.
Datasets declared in config files use relative paths, so ordinary benchmarks are not affected.
Suggested fix.
Store the rows path relative to the working directory when it is under it, as config datasets already do. Collection already resolves relative paths under the working or install directory (_resolve_under_cwd_or_install, train_data_utils.py:673).
Regression test: prepare and collate the same Harbor target from two copies of the checkout into one output, and assert there is no conflict.
An output prepared before the fix conflicts once after it.
Setting overwrite_metrics_conflicts for resubmits is not a good fix: the metrics comparison is what checks that a resumed run's prepared data matches the data its earlier segments used.
@adil-a, this is in the Harbor loader. Several open Harbor PRs touch materialize.py, so it may fit best in one of them.
Activity