Repository navigation
fix(tier3): preserve trailing hyphens in Gym trial identity - #732
Conversation
Signed-off-by: Afloat <ShuffleMonkey@163.com>
chrisknvidia
left a comment
There was a problem hiding this comment.
Thanks, good catch. Case IDs may end in '-' and Harbor keeps them, so collapsing 'case' and 'case-' into the same Gym trial directory really did lose a trial's evidence while the stats still counted it. Dropping the strip is the right fix: everything that reaches _safe() is a validated case ID or a staged task directory name, neither of which can start with '-' or contain characters outside the safe set, and unknown rollout task IDs are rejected before a trial is named, so nothing can now produce a leading-hyphen directory. The four new tests fail on main and pass here, and they exercise the real job writer end to end (directories, result.json, rewards, trajectories and the aggregate reward groups).
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
rng1995
left a comment
There was a problem hiding this comment.
Thanks, @Afloat16, for fixing the Gym trial identity collision. Preserving trailing hyphens matches the validated case-ID contract and keeps rewards, trajectories, attempt records and aggregate reward groups separate. I found no new actionable issues on this head.
Validation: 13 focused tests passed, covering the new trailing-hyphen cases and existing Gym writer/collector behavior.
rng1995
left a comment
There was a problem hiding this comment.
Thanks @Afloat16 for this contribution! I reviewed c1896c1a54. I reproduced the problem on main, confirmed this change fixes it, checked that the new tests fail on main, and ran the new and related tests on this head (all pass). I left 1 inline comment (1 P3); please take a look.
Merge current main while retaining this change and the published release notes. Signed-off-by: Afloat <ShuffleMonkey@163.com>
|
Addressed in f7a103a: after merging main, the NeMo Gym trailing-hyphen note now belongs to |
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Head branch was pushed to by a user without write access
Preserve this pull request's code and tests while resolving the changelog conflict. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Preserve both the PR entry and current upstream release notes. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Synchronize with NVIDIA/SkillEvaluator main f867b7f. Retain this PR's entry under Unreleased and preserve published release history. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Resolve the CHANGELOG.md conflict by keeping main's Unreleased/Fixed entries unchanged and retaining the trailing-hyphen note as a Fixed bullet under Unreleased. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Resolve the CHANGELOG.md conflict by keeping main's entries and this change's entry under Unreleased. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Resolve the CHANGELOG.md conflict by keeping main's entries and this change's entry under Unreleased. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Thanks @Afloat16 for this contribution! I re-checked 3ea4e26f0: I merged current main into the branch (the only conflict was CHANGELOG.md, resolved by keeping main's entries and this entry under Unreleased), confirmed that every earlier review comment is addressed in the code, and ran this PR's tests and ruff, which pass. I found nothing new. Approving.
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed the refreshed branch. The merge preserves the Gym implementation and its regression tests and keeps the release note under Unreleased. The four Gym regression cases and the previously failing timing check passed locally.
Summary
Trailing hyphens are valid in dataset case IDs, and Harbor task directories preserve them. NeMo Gym normalization strips leading/trailing hyphens when forming trial directory names, so distinct cases such as
caseandcase-both writecase__gym001. The later case overwrites the earlier reward, result and trajectory while aggregate statistics still count both trials.Preserve these safe identity characters when normalizing Gym trial names. Unsafe-character replacement and the existing empty-name fallback remain intact.
Integration refresh — 2026-11-19
Head
f3830e6710231387e595044021da334c072ba25dmerges mainac9fc0ef4999ee5eb86eae27ec3a83c880891c92and resolves the Unreleased changelog conflict by retaining both entries. The Gym result implementation and trial-identity regression-test blobs are unchanged from the preceding PR head; all non-PR files match that main revision. Structural review confirmed that the original PR diff is preserved. Earlier test results below apply to those unchanged files; this changelog resolution does not claim a full-suite rerun. Current workflows await maintainer approval.Verification
All four new regressions fail on unchanged base
8fe9723. They validate the case IDs and exercise the actual job writer with one/two trailing hyphens and one/two attempts, then verify distinct directories, rewards, case metadata, trajectories and aggregate trial references.python -m pytest tests/tier3/test_gym_trial_identity.py tests/test_nemo_gym_backend.py -q— 196 passed, 25 failed. All four new regressions pass. Each of the 25 failures is in an existing runner test and raisesOutput provenance key must be outside evaluated and generated treesbefore reaching normalization. Running those same 25 tests against unchanged base8fe9723reproduces all 25 failures with the same error; the sandbox fixture places its provenance key under the generated workspace.make lintequivalent:python -m ruff check src testsmake testdid not complete successfully in this environment (see below)make buildequivalent:python -m build(wheel and sdist)The unchanged base
8fe9723, tested withpython -m pytest -x -q, stops after 456 passed and 19 deselected attests/ci/test_gateway_benchmark_workflows.py::test_gitlab_enriched_tier1_applies_the_keyless_job_baselines[extra0-expected0]. The sandbox has no/tmp, while that workflow fixture explicitly invokesmktemp -d /tmp/skillevaluator-enriched-tier1.XXXXXX. The same test fails for the same reason on the retry branch. No full-suite pass is claimed.Release Impact
CHANGELOG.md