Skip to content

feat(launch): record one job_event.json per benchmark job - #3807

Draft
adibarra wants to merge 7 commits into
mainfrom
feat/job-wide-event
Draft

adibarra wants to merge 7 commits into
mainfrom
feat/job-wide-event

Conversation

@adibarra

@adibarra adibarra commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Each benchmark job now writes one wide event, job_event.json: a single JSON record of what happened to the job. The launcher fills it in as it runs and writes it in a finally, so it is written on success and on failure.

  • Contents:
    • Identity: run, config point, image, recipe reference and fingerprint, cluster.
    • Slurm job ID, batch job ID and node list.
    • Decisions: launch path, power, golden acceptance length.
    • Time per stage: prepare, submit, queue wait, run, collect.
    • outcome.
    • error, with the stage, type, message, exit code, whether it is retriable, and a pointer to the most relevant log.
  • Upload: each job uploads its record as artifact job_event_*. python -m infx.results.collect_events concatenates them into events.jsonl. A new collect-job-events.yml job runs after every benchmark and eval job in run-sweep.yml and e2e-tests.yml and uploads it as artifact job_events.
  • Failures in Actions: on failure the launcher prints one ::error title=<stage>::<type>: <message> line at its exit boundary. The batch re-entry doesn't print it.
  • Log hygiene in infx/launch: one masking echo helper shared with bench, which stays stdlib-only, and warnings go to stderr instead of stdout.
  • Docs: docs/troubleshooting.md describes the record and gives example jq queries.

Verification

  • Behavioral tests drive the real launcher through fake Slurm for a success and a failure, then check the emitted record. Also covered: events.jsonl collection and ::error:: escaping.
  • Full CI suite: 2234 passed, 1 skipped. Ruff is clean, and zizmor reports nothing on the changed workflows.

Known gaps

  • The collection job checks out the tooling ref (main), so job_events stays empty until this lands on main. Its steps are continue-on-error.
  • A cancelled run produces no job_events; the per-job job_event_* artifacts remain.

The launcher and the container-side bench commands each had an echo()
helper, and only the launcher's masked *TOKEN* and *SECRET* values. The
masking echo now lives in infx.bench.proc (stdlib-only, Python 3.10),
which the launcher already imports; bench call() and tee() also mask the
child environment's secrets.

Two launcher warnings that went to stdout now go to stderr with the
other diagnostics.
Debugging a failed benchmark job meant reading a multi-hour Actions log
plus the server logs. Each `python -m infx.launch run` now writes one
record, job_event.json, into the workspace when it exits on any path:
the run, job and point identity, image, recipe, cluster, Slurm job and
nodes; the launch decisions (path, DCGM power, golden acceptance length,
eval flags, KV offloading); seconds per stage (prepare, submit,
queue_wait, run, collect); the outcome; and for a failure the first
error's stage, type, message, exit code, retriable hint and the log to
read first. On GitHub Actions a failure also emits one ::error
annotation titled with its stage.

The benchmark templates upload the record as job_event_<RESULT_FILENAME>,
and collect-results joins the records it can download into events.jsonl
in the job_events artifact (python -m infx.results.collect_events). A
batch-wrapped launch continues the record of the launch it re-runs. The
golden acceptance planner now reports the length it simulates, and the
Slurm accounting read includes the job's node list.
Collect-results waits only for throughput jobs, so eval-only jobs were missing from events.jsonl and evals-only sweeps produced no job_events artifact. A dedicated collect-job-events template now runs after every sweep job in run-sweep.yml and e2e-tests.yml. Add the Chinese troubleshooting section.
…tions

finish() reuses exited() for its exit-status fallback, the single-use
PREPARE constant is inlined, and a cleanup's name is looked up only when
its nonzero result is reported. The srt driver tests stop asserting
environment values copied verbatim into the record, a non-negative stage
duration check, and an annotation-absence check that could not fail
without GITHUB_ACTIONS.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant