Skip to content

Commit 4bc6937

Browse files
cjluo-nvclaude
andcommitted
[skill] evaluation: stop GDPVal leaking secrets to the log; fix the fake canary
Two findings from review, both confirmed against a real run. 1. Secret leak. The task `command:` opens with `set -ex`, and `set -x` traces commands AFTER expansion -- so the `ng_prepare_benchmark` trace line wrote $HF_TOKEN, $INFERENCE_API_KEY and $TAVILY_API_KEY in plaintext into the eval log, which lives on shared FS and is uploaded to MLflow when export.mlflow.log_logs is true. Verified in a completed run's client log: the traced line carries the expanded token, not `$HF_TOKEN`. Wrap that one call in `set +x` / `set -x`. The rollout call below it was already safe -- it goes through the quoted heredoc, so its secrets stay literal until a shell that never sets -x expands them; this call just wasn't covered by the same pattern. 2. `limit_samples` is inert on the gym path -- the gym does its own data prep and rollout collection, so the launcher-level limiter is ignored and you get the full 220-task run. This was observed during the validated run but the finding was lost in the doc-compression pass while the instruction depending on it survived in three places, so following the documented canary launches the heaviest benchmark in the suite believing it is a two-task smoke test. Replaced with the real procedure: launch, then treat the first ~20-30 minutes as the canary (SIF-sandbox line, judge auth, rollouts flowing), with the grep commands to check; note stage 1 of multistage as a natural checkpoint. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Chenjie Luo <chenjiel@nvidia.com>
1 parent 62fbb10 commit 4bc6937

3 files changed

Lines changed: 32 additions & 11 deletions

File tree

.agents/skills/evaluation/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ GDPVal:
7070
unsandboxed. Verify with `gdpval-sif.sh --check`. `.env` needs `HF_TOKEN`, `INFERENCE_API_KEY`, `TAVILY_API_KEY`,
7171
`INFERENCE_JUDGE_URL`, `GDPVAL_SIF_DIR`, and `NEMO_EVALUATOR_TRUST_PRE_CMD=1` (the
7272
config has a `pre_cmd`). Thinking mode is mandatory (non-thinking loses ~86%).
73-
4. Dry-run → canary (`limit_samples=2`, verify the SIF sandbox + judge) → full.
73+
4. Dry-run → launch. **`limit_samples` is inert on the gym path** (the gym runs all
74+
220 tasks regardless), so there is no cheap canary: watch the real run's first
75+
~20–30 min for the SIF-sandbox line and judge auth, and cancel if wrong. See the
76+
recipe's Canary section.
7477

7578
---
7679

.agents/skills/evaluation/recipes/examples/gym_gdpval/example_gym_gdpval.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
# search), INFERENCE_JUDGE_URL (judge host), and GDPVAL_SIF_DIR (item 1). See
4040
# recipes/env.example.
4141
#
42-
# Canary (validates SIF sandbox + judge + gym plumbing on a couple of tasks):
43-
# nel run --config example_gym_gdpval.yaml --env-file .env \
44-
# -o ++evaluation.nemo_evaluator_config.config.params.limit_samples=2
42+
# NOTE: `limit_samples` is INERT on the gym path — the gym runs all 220 tasks no
43+
# matter what, so there is no cheap smoke test. Launch the real run and watch its
44+
# first ~20-30 min (SIF-sandbox line, judge auth, rollouts appearing); see the
45+
# recipe's Canary section.
46+
# nel run --config example_gym_gdpval.yaml --env-file .env
4547
# =============================================================================
4648
defaults:
4749
# slurm/default works anywhere; if your install ships a predefined
@@ -283,7 +285,15 @@ evaluation:
283285
# Writable staging dir for ref files (bind-mounted, see execution).
284286
mkdir -p /gdpval_ref_files
285287
288+
# SECRETS: `set -x` traces commands AFTER expansion, and these param blobs
289+
# carry $HF_TOKEN / $INFERENCE_API_KEY / $TAVILY_API_KEY. Without this the
290+
# trace line writes all three in plaintext into the eval log — which lives on
291+
# shared FS and is uploaded to MLflow when export.mlflow.log_logs is true.
292+
# (The rollout call below is already safe: it goes through the quoted heredoc,
293+
# so its secrets stay literal until a shell that never sets -x expands them.)
294+
set +x
286295
ng_prepare_benchmark {{config.params.extra.nemo_gym.data_prep_params}} {{config.params.extra.nemo_gym.common_params}}
296+
set -x
287297
# The rollout command is written to a script and run from it, rather than passed
288298
# to `bash -c '...'`. Gym params legitimately CONTAIN single quotes — comparison
289299
# mode's ++multistage.stages='[{num_tasks: 45}, ...]' and ++...judge_panel='[{...}]'

.agents/skills/evaluation/recipes/tasks/aa_gym/gdpval.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,26 @@ recipes/examples/gym_gdpval/example_gym_gdpval.yaml # SLURM + single-node vLLM
4848
`num_repeats=1` — already set by the template via `++num_repeats=1`; both
4949
current goldens use it. A full 220-task run of a large MoE typically needs multi-node.
5050

51-
## Canary
51+
## Canary`limit_samples` does NOT work here
5252

53-
Validate the SIF sandbox + judge + gym plumbing on a couple of tasks before the
54-
full run:
53+
**`++…params.limit_samples=N` is inert on the gym path.** The gym does its own data
54+
prep and rollout collection, so the launcher-level limiter is ignored: you get the
55+
full 220-task run. Do not use it believing you launched a two-task smoke test — this
56+
is the heaviest benchmark in the suite.
57+
58+
There is no cheap sample-limited canary. Instead, **launch the real run and treat its
59+
first ~20–30 minutes as the canary**, cancelling if any of these is wrong:
5560

5661
```bash
57-
nel run --config example_gym_gdpval.yaml --env-file .env \
58-
-o ++evaluation.nemo_evaluator_config.config.params.limit_samples=2
62+
RD=<output_dir>/<run>/nemo_gym.0
63+
grep -c "Using Apptainer container" $RD/logs/client-*.log # sandbox actually used
64+
grep -c "falling back\|not a git repo" $RD/logs/client-*.log # unsandboxed / inert pin
65+
grep -ciE " 401 | 403 |Internal Server Error" $RD/artifacts/nemo_gym_logs/gdpval_judge_model.log
66+
wc -l $RD/artifacts/evaluator_rollouts.jsonl # rollouts flowing
5967
```
6068

61-
Inspect logs for the SIF fallback warning, judge auth/429s, and Ray/gym shutdown
62-
hangs (see `references/gym-gdpval.md` → failure modes).
69+
In comparison mode stage 1 (45 tasks) is a natural early checkpoint — an ELO estimate
70+
appears before the full 220-task stage 2 starts.
6371

6472
## Score Extraction
6573

0 commit comments

Comments
 (0)