-
Notifications
You must be signed in to change notification settings - Fork 553
Gate evaluation Step 1 on the validated launcher version #2198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,7 +82,7 @@ tasks). If the user asks for GDPVal: | |
|
|
||
| ### Step 1 — Prerequisites | ||
|
|
||
| Run `nel --version`; if missing, instruct `pip install nemo-evaluator-launcher`. If user has an existing config, skip to Step 8 (optionally review for `???` and quantization flags first). | ||
| Run **`"$SKILL_DIR/scripts/nel-check.sh"`** — it asserts the `nel` on PATH is the validated launcher and, when it is not, prints the exact `pip install` command to fix it. Do **not** just check that `nel` exists: a base environment can already carry an older launcher (directly, or via `nemo-evaluator-launcher-internal`, which ships its own launcher version), and scoring on it silently makes the run non-comparable with runs on the validated one. Record the version line it prints with the scores (Step 9). See `references/launcher-version.md` for why it is pinned and how to bump it. If user has an existing config, skip to Step 8 (optionally review for `???` and quantization flags first). | ||
|
|
||
| **Set up `.env` now (not Step 8).** The working `.env` lives at the **workspace root** — the directory you run `nel` from — matching `modelopttools:eval-config`'s convention; do **not** create it under the skill dir. (NEL does not discover `.env` by path: it reads secrets from the shell env via the `host:` prefix after you `source`, so the location is purely *which file you source* before `nel run`. Keeping the single `.env` at the workspace root avoids a stale duplicate under the symlinked, shared `.agents/` skill tree.) For judge-scored / user-sim tasks (HLE, AA-LCR, Tau2), seed it from the template if absent — the template ships under the skill dir, the working `.env` does not: `[ -f .env ] || cp "$SKILL_DIR/recipes/env.example" .env`. Then try `modelopttools:eval-config` (if available) to fill the judge `model_id`/`url` rows (user adds the secret key). Needed before Step 5, which substitutes those values into task `<VAR>` placeholders. | ||
|
|
||
|
|
@@ -407,9 +407,14 @@ export DUMMY_API_KEY=dummy | |
| **Step 8.1 — Dry-run** (config validation): | ||
|
|
||
| ```bash | ||
| "$SKILL_DIR/scripts/nel-check.sh" # re-assert the validated launcher before scoring | ||
| nel run --config <path> --dry-run | ||
| ``` | ||
|
|
||
| Re-run the check here even if Step 1 already passed: the existing-config path skips | ||
| Step 1 entirely, and this is the last point before a run that will be scored and | ||
| compared. GDPVal instead goes through `nel-gdpval.sh`, which pins the launcher itself. | ||
|
|
||
| Fix unresolved `???`, bad Hydra overrides, missing env vars, invalid mounts, image issues, sbatch errors, obvious deployment errors before proceeding. | ||
|
|
||
| > **Dry-run does NOT validate the image/vLLM version** (image pulled only at deploy). Confirm `image:` ≥ the exact model's `recipes.vllm.ai` minimum (Step 3) before submitting — too-old passes dry-run, then crashes mid-inference. | ||
|
|
@@ -450,6 +455,8 @@ Remove `limit_samples` overrides; keep canary-validated parallelism. If the cana | |
|
|
||
| Before pulling/reporting scores, validate the run. Read `references/run-validation.md` for NEL timeout/resume behavior, completed-run validation, diagnostics, and score harvesting. For a baseline that will be compared with a candidate, also perform its **External Baseline Sanity Check** before a success verdict, then hand the validated runs to `compare-results` for baseline-vs-candidate deltas. | ||
|
|
||
| **Report the launcher version with the scores** (`"$SKILL_DIR/scripts/nel-check.sh" --version`, or the line Step 1 printed). It is the harness half of any delta: a baseline and a candidate scored on different launchers are not comparable, and without the version recorded that is undetectable after the fact. See `references/launcher-version.md`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Record the successful pre-run validation result, not the current configured pin.
🧰 Tools🪛 SkillSpector (2.5.1)[error] 87: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts. Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths. (Privilege Escalation (PE3)) [error] 395: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts. Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths. (Privilege Escalation (PE3)) [error] 396: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts. Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths. (Privilege Escalation (PE3)) [error] 396: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts. Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths. (Privilege Escalation (PE3)) [error] 397: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts. Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths. (Privilege Escalation (PE3)) 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
|
|
||
| --- | ||
|
|
||
| Issues: <https://github.com/NVIDIA-NeMo/Evaluator/issues> · <https://github.com/NVIDIA-NeMo/Evaluator/discussions> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Launcher version — the validated `nemo-evaluator-launcher` pin | ||
|
|
||
| Shared reference for the **0.2.x path** (Steps 1–9, including GDPVal). nel-next | ||
| (`nemo-evaluator` 0.4.x) is a different package and pins separately — see | ||
| `references/nel-next.md`. | ||
|
|
||
| The validated version lives in one place, `scripts/nel-validated-version.sh`, and | ||
| is consumed by `scripts/nel-check.sh` (Step 1 gate) and `scripts/nel-gdpval.sh` | ||
| (GDPVal's hard pin). Bump that one file, not the call sites. | ||
|
|
||
| ## Why the version is pinned | ||
|
|
||
| **Comparability.** This skill exists to produce baseline-vs-candidate deltas. | ||
| Running the two legs on different launchers folds a harness change into the | ||
| measured model delta — the same reasoning `nel-next.sh` already applies to its | ||
| 0.4.x git SHA. Keep a comparison pair on one launcher, and record the version | ||
| with the scores. | ||
|
|
||
| **A known failure, on GDPVal specifically.** Launchers older than the pin emit | ||
| `export NEL_INVOCATION_ID="${NEL_INVOCATION_ID}"` into the generated `run.sub` | ||
| without assigning it first, so the job exits with `NEL_INVOCATION_ID: unbound | ||
| variable` under `set -u` before the evaluation client starts. This fires only for | ||
| configs that forward `runtime:NEL_INVOCATION_ID`, which today is GDPVal alone — | ||
| so it is a GDPVal correctness requirement, while comparability applies to every | ||
| scored task. Details and the dry-run check: `references/gym-gdpval.md`. | ||
|
|
||
| ## Presence is not the same as version | ||
|
|
||
| Step 1 used to accept any `nel` already on PATH. That is how a GDPVal run picked | ||
| up a stale 0.2.4 from the base environment and failed. Note that | ||
| `nemo-evaluator-launcher-internal` ships its **own** launcher version and can | ||
| supply an older `nel` even when it is itself newer — `nel --version` prints both | ||
| rows, and only the `nemo_evaluator_launcher` row governs generated-Slurm and | ||
| schema behavior: | ||
|
|
||
| ```text | ||
| nemo_evaluator_launcher: 0.2.4 <- this row gates | ||
| nemo_evaluator_launcher_internal: 0.3.174+20260609 | ||
| ``` | ||
|
|
||
| Run the gate rather than eyeballing it: | ||
|
|
||
| ```bash | ||
| "$SKILL_DIR/scripts/nel-check.sh" # exits non-zero with the pip command to fix it | ||
| ``` | ||
|
|
||
| `NEL_ALLOW_UNVALIDATED=1` downgrades a mismatch to a warning and marks the output | ||
| `(UNVALIDATED)` — dev/canary only, never for scored or compared runs. GDPVal has | ||
| no escape hatch: it runs through `nel-gdpval.sh`, which hard-pins the launcher. | ||
|
|
||
| ## Updating the pin | ||
|
|
||
| When a newer `nemo-evaluator-launcher` release is available: | ||
|
|
||
| 1. Review its release notes for launcher schema, generated Slurm, resume, and | ||
| export changes. | ||
| 2. Update `NEL_VALIDATED_VERSION` in `scripts/nel-validated-version.sh`, and the | ||
| expected version in `tests/test_nel_check.py` / `tests/test_nel_gdpval.py`. | ||
| 3. Run the focused tests and pre-commit checks, and confirm `nel-check.sh | ||
| --version` and `nel-gdpval.sh --version` both report the candidate. | ||
| 4. Re-validate on a real run before adopting it for scored work — for GDPVal, | ||
| follow the extra dry-run and canary steps in `references/gym-gdpval.md` | ||
| (`limit_samples` is inert there, so there is no cheap reduced-sample canary). | ||
| 5. Do not mix launcher versions within a baseline-versus-candidate comparison. If | ||
| the baseline was scored on the old pin, either keep the candidate there too or | ||
| re-run the baseline on the new one. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #!/usr/bin/env bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # nel-check.sh — assert the `nel` on PATH is the validated launcher (Step 1). | ||
| # | ||
| # Presence is not enough: a base environment can already carry an older | ||
| # `nemo-evaluator-launcher` (directly, or via `nemo-evaluator-launcher-internal`, | ||
| # which ships its own launcher version). Running a baseline and a candidate on | ||
| # different launchers folds a harness change into the measured model delta, so | ||
| # this fails loudly instead of silently scoring on whatever is installed. | ||
| # | ||
| # Usage: | ||
| # nel-check.sh # assert PATH `nel` == validated version | ||
| # nel-check.sh --version # print the validated version | ||
| # nel-check.sh --spec # print the pip spec to install | ||
| # | ||
| # Set NEL_ALLOW_UNVALIDATED=1 to downgrade the mismatch to a warning (dev/canary | ||
| # only — never for scored runs). GDPVal has no such escape hatch: it goes through | ||
| # nel-gdpval.sh, which hard-pins the launcher. See references/launcher-version.md. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| # shellcheck source=./nel-validated-version.sh | ||
| source "$SCRIPT_DIR/nel-validated-version.sh" | ||
|
|
||
| case "${1:-}" in | ||
| -h|--help) awk '/^# nel-check\.sh/{p=1} /^set /{p=0} p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; | ||
| --version) echo "$NEL_VALIDATED_VERSION"; exit 0 ;; | ||
| --spec) echo "$NEL_VALIDATED_SPEC"; exit 0 ;; | ||
| esac | ||
|
|
||
| _install_hint() { | ||
| echo " pip install '${NEL_VALIDATED_SPEC}'" >&2 | ||
| echo "Then re-run this check. If a stale launcher keeps winning, it is likely" >&2 | ||
| echo "pulled in by 'nemo-evaluator-launcher-internal' — uninstall or pin that too." >&2 | ||
| } | ||
|
|
||
| command -v nel >/dev/null 2>&1 || { | ||
| echo "ERROR: 'nel' not found on PATH. Install the validated launcher:" >&2 | ||
| _install_hint | ||
| exit 1 | ||
| } | ||
|
|
||
| # `nel --version` prints the version table on stdout and log lines on stderr. | ||
| # The table lists several packages; `nemo_evaluator_launcher` is the one that | ||
| # determines generated-Slurm and schema behavior. | ||
| version_table="$(nel --version 2>/dev/null || true)" | ||
| found="$(awk -F': ' '$1 == "nemo_evaluator_launcher" { print $2; exit }' <<<"$version_table")" | ||
|
|
||
| if [[ -z "$found" ]]; then | ||
| echo "ERROR: could not read 'nemo_evaluator_launcher' from 'nel --version'." >&2 | ||
| echo "Got:" >&2 | ||
| echo "$version_table" >&2 | ||
| _install_hint | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ "$found" != "$NEL_VALIDATED_VERSION" ]]; then | ||
| if [[ "${NEL_ALLOW_UNVALIDATED:-}" == "1" ]]; then | ||
| echo "WARNING: nel ${found} is NOT the validated ${NEL_VALIDATED_VERSION}." >&2 | ||
| echo "WARNING: NEL_ALLOW_UNVALIDATED=1 — dev/canary only. Do not report these" >&2 | ||
| echo "WARNING: scores, and never compare them against a ${NEL_VALIDATED_VERSION} baseline." >&2 | ||
| echo "nemo_evaluator_launcher: ${found} (UNVALIDATED)" | ||
| exit 0 | ||
| fi | ||
| echo "ERROR: 'nel' on PATH is ${found}, but the validated launcher is ${NEL_VALIDATED_VERSION}." >&2 | ||
| echo "Scoring on a different launcher makes the run non-comparable with runs on" >&2 | ||
| echo "${NEL_VALIDATED_VERSION}. Install the validated launcher:" >&2 | ||
| _install_hint | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Record this line with the scores (Step 9) — it is the harness half of the delta. | ||
| echo "nemo_evaluator_launcher: ${found} (validated)" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Single source of truth for the validated `nemo-evaluator-launcher` (the 0.2.x | ||
| # path — Steps 1-9 and GDPVal). Sourced by `nel-check.sh` and `nel-gdpval.sh` so | ||
| # one edit bumps both; see references/launcher-version.md before changing it. | ||
| # | ||
| # Assigned unconditionally, never from the environment: a stale ambient value | ||
| # (e.g. sourced from `.env`) must not be able to select a different launcher. | ||
| # nel-next (`nemo-evaluator` 0.4.x) is a different package and pins separately in | ||
| # nel-next.sh. | ||
|
|
||
| NEL_VALIDATED_VERSION="0.2.6" | ||
| NEL_VALIDATED_SPEC="nemo-evaluator-launcher[all]==${NEL_VALIDATED_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 50380
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 12898
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 2508
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 13484
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 33436
🌐 Web query:
"plugins/modelopt/skills/evaluation/SKILL.md" "nel-check.sh"💡 Result:
The paths you provided relate to the NVIDIA Model Optimizer repository [1][2]. 1. plugins/modelopt/skills/evaluation/SKILL.md: This file acts as an agentic skill definition [3][1]. In the context of the NVIDIA Model Optimizer, this skill is used for managing and running LLM evaluations [1][4]. It includes instructions for handling different evaluation workflows, such as standard evaluations using the nemo-evaluator-launcher [1][5] and specialized agentic benchmarks (AA benchmarks) that require the nel-next (nemo-evaluator 0.3.x) framework [1][2]. 2. nel-check.sh: While not a standard, globally defined tool name, in this repository ecosystem, it (often referred to as nel-next.sh) is a helper script used for environment management and execution of the nel-next evaluation pipeline [1][2]. For instance, it is used to perform isolated setups of the 0.3.x virtual environment, run evaluations (via nel-next.sh eval run), and manage artifact pushing to MLflow [1][4][2]. In summary, these files are part of the NVIDIA Model Optimizer's automation suite for benchmarking models, where the SKILL.md provides the procedural instructions for an AI agent to perform evaluations, and nel-next.sh (likely the script you are referring to as nel-check.sh) provides the underlying execution logic for newer evaluation types [1][2].
Citations:
🏁 Script executed:
Repository: NVIDIA/Model-Optimizer
Length of output: 281
Gate
nel runon successful launcher validation.The code block does not enable
errexit. A failednel-check.shdoes not stopnel run. Chain the commands with&&or add an explicit failure branch.🧰 Tools
🪛 SkillSpector (2.5.1)
[error] 87: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
[error] 395: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
[error] 396: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
[error] 396: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
[error] 397: [PE3] Credential Access: Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Remediation: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
(Privilege Escalation (PE3))
🤖 Prompt for AI Agents