Skip to content

fix: poll job.status() once per job in Experiment.status() - #5

Open
andrewwhitecdw wants to merge 2 commits into
mainfrom
bugfix/experiment-status-polls-once
Open

fix: poll job.status() once per job in Experiment.status()#5
andrewwhitecdw wants to merge 2 commits into
mainfrom
bugfix/experiment-status-polls-once

Conversation

@andrewwhitecdw

Copy link
Copy Markdown
Owner

Summary

Experiment.status() called job.status(runner=...) twice while building one status row: once for the display text and again for the returned dictionary. A backend failure therefore produced two identical ERROR tracebacks per status request and wasted a redundant status poll.

This was flagged as a non-blocking follow-up in NVIDIA-NeMo#569.

Changes

  • Store job.status(runner=self._runner) in a local variable and reuse it for both the display string and the returned dict in nemo_run/run/experiment.py.
  • Add a regression test in test/run/test_experiment.py asserting job.status() is called exactly once for both return_dict=True and the default print path.

Testing

uv run -- pytest test/run/test_experiment.py::test_experiment_status_polls_job_once -xvs

Result: 1 passed.

Ruff lint and format also pass on the changed files.

Contributor guidelines

  • DCO sign-off included.
  • One fix per PR.
  • Includes regression test.

andrewwhitecdw and others added 2 commits August 6, 2026 16:51
Experiment.status() called job.status(runner=...) twice while building
one status row: once for the display text and again for the returned
dictionary. A backend failure therefore produced two identical ERROR
tracebacks per status request and wasted a redundant status poll.

Store the status in a local variable and reuse it for both the display
string and the dict.

Add a regression test that asserts job.status() is called exactly once
for both return_dict=True and the default print path.

Signed-off-by: Andrew White <andrewh@cdw.com>
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.

2 participants