Skip to content

Commit 8c56e10

Browse files
agronskiyclaude
andauthored
feat: expose invocation ID as NEL_INVOCATION_ID env var (#894)
## Summary - Exports `NEL_INVOCATION_ID` environment variable at the top of both docker (local) and slurm execution scripts - Allows downstream tooling to reference the invocation ID during evaluation runs ## Test plan - [ ] Verify docker `run.sh` contains `export NEL_INVOCATION_ID=...` at the top - [ ] Verify slurm `run.sub` contains `export NEL_INVOCATION_ID=...` after `TASK_DIR` - [ ] Run a local dry-run and inspect generated script 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Alex Gronskiy <agronskiy@nvidia.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1faaa10 commit 8c56e10

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

packages/nemo-evaluator-launcher/src/nemo_evaluator_launcher/executors/local/executor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ def execute_eval(cls, cfg: DictConfig, dry_run: bool = False) -> str:
297297
auto_export_config_str=auto_export_config_str,
298298
extra_docker_args=extra_docker_args,
299299
endpoint_readiness_timeout=endpoint_readiness_timeout,
300+
invocation_id=invocation_id,
300301
).rstrip("\n")
301302
+ "\n"
302303
)
@@ -316,6 +317,7 @@ def execute_eval(cls, cfg: DictConfig, dry_run: bool = False) -> str:
316317
auto_export_config_str=auto_export_config_str,
317318
extra_docker_args=extra_docker_args,
318319
endpoint_readiness_timeout=endpoint_readiness_timeout,
320+
invocation_id=invocation_id,
319321
).rstrip("\n")
320322
+ "\n"
321323
)

packages/nemo-evaluator-launcher/src/nemo_evaluator_launcher/executors/local/run.template.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# limitations under the License.
1515

1616

17+
NEL_INVOCATION_ID="{{ invocation_id }}"
18+
1719
# check if docker exists
1820
command -v docker >/dev/null 2>&1 || { echo 'docker not found'; exit 1; }
1921

packages/nemo-evaluator-launcher/src/nemo_evaluator_launcher/executors/slurm/executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,7 @@ def _create_slurm_sbatch_script(
702702
s += "#SBATCH --output {}\n".format(remote_task_subdir / "logs" / "slurm-%A.log")
703703
s += "\n"
704704
s += f'TASK_DIR="{str(remote_task_subdir)}"\n'
705+
s += f'NEL_INVOCATION_ID="{invocation_id}"\n'
705706
s += "\n"
706707

707708
# Collect env vars using unified pipeline

0 commit comments

Comments
 (0)