Skip to content

fix: map Harbor trial folders to eval case ids - #104

Open
mimran-khan wants to merge 7 commits into
NVIDIA:mainfrom
mimran-khan:fix/refine-harbor-trial-folders
Open

fix: map Harbor trial folders to eval case ids#104
mimran-khan wants to merge 7 commits into
NVIDIA:mainfrom
mimran-khan:fix/refine-harbor-trial-folders

Conversation

@mimran-khan

Copy link
Copy Markdown
Contributor

Summary

--refine keyed trajectories by the raw Harbor trial folder name. Collection writes case-001__Lmi47iy, and eval cases are case-001, so every lookup missed.

Discovery now splits off the __suffix and keys by the case id. A folder named case-001 still works. Fixes #93.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • Updated CHANGELOG.md

--refine keyed trajectories by the raw trial directory name, but Harbor
writes folders like case-001__Lmi47iy. Split off the suffix so
trajectories.get(case id) actually finds them.

Fixes NVIDIA#93

Signed-off-by: mimran-khan <mohammed_imran.khan@outlook.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the exact current head against #93 and the Harbor persisted-trial naming path. Suffixed folders map back to case ids and legacy unsuffixed folders remain unchanged. Focused tests pass (18), with Ruff and diff checks clean. No actionable findings; approved. The red Gitleaks job is unrelated branch history.

@rng1995

rng1995 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

@mimran-khan - Please resolve merge conflicts

@mimran-khan

Copy link
Copy Markdown
Contributor Author

Merged main in. Changelog conflict is resolved.

@mimran-khan

Copy link
Copy Markdown
Contributor Author

Merged latest main (including #102) and resolved the CHANGELOG conflict. Ready for another look.

@rng1995

rng1995 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Please resolve merge conflict in CHANGELOG.md so that I can merge it. Thanks for your contribution and patience @mimran-khan

@rng1995
rng1995 enabled auto-merge (squash) August 31, 2026 15:55
auto-merge was automatically disabled August 31, 2026 17:06

Head branch was pushed to by a user without write access


def _case_id_from_trial_dir(trial_dir_name: str) -> str:
"""Map Harbor trial folders like ``case-001__Lmi47iy`` back to the eval case id."""
return trial_dir_name.split("__", 1)[0]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Resolve case IDs from persisted reward metadata

I took another final review pass and found one remaining issue that should be fixed before merge. Splitting at the first __ only handles simple <case-id>__<suffix> folders. Stop-on-pass aggregation persists <job-name>__<child-trial>, valid case IDs may themselves contain __, and folder names can differ from the canonical ID. A fresh reproduction mapped a stop-on-pass trial to the job prefix and collapsed case__one and case__two into the same case key. Each persisted trial already carries the canonical reward.json.entry_id. Can we prefer that value, keep folder parsing only as an unambiguous legacy fallback, and add coverage for stop-on-pass trials, __ in IDs, long or truncated IDs, missing metadata, and collisions before we merge?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed at 5cb7de6. Case ids now come from reward.json / verifier/reward.json entry_id first. Folder parsing only runs when the __ suffix looks like a Harbor attempt or random tail; otherwise the full directory name is kept so case__one and case__two stay distinct. Added coverage for stop-on-pass folders, double-underscore ids, and missing metadata.

Merge main and prefer reward.json entry_id when mapping persisted trial
folders to eval case ids. Use folder-name parsing only for unambiguous
Harbor suffix tails; keep full folder names when metadata is missing.
@mimran-khan

Copy link
Copy Markdown
Contributor Author

Merged main and addressed the reward entry_id feedback at 5cb7de6. Ready for re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: create-eval-dataset --refine cannot match Harbor trial folders to case ids

3 participants