Remote execution: SSH submission, job tracking, watch loop, sharded labeling#2
Open
basillicus wants to merge 15 commits into
Open
Remote execution: SSH submission, job tracking, watch loop, sharded labeling#2basillicus wants to merge 15 commits into
basillicus wants to merge 15 commits into
Conversation
…arantined failures, and receipt-based resume that reuses completed frames and retries failed ones Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
… a 'validate' stage (defaults to the trained model and its holdout valid.xyz); decode array properties in read_frames Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
… the new validate stage and labeling failure semantics Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
…ts/journal/quarantine files so 100k+-frame runs stay Lustre-safe Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
…ex, traincraft runs/status commands - stages emit start/done/skipped/failed events (one small events.jsonl per run, appended by whichever process runs the stage; safe on Lustre because stage jobs are dependency-chained and appends need no locking) - RunIndex: disposable SQLite cache (<outdir>/index.db) refreshed lazily by the CLI on the login node only; delete-safe, rebuilt from event logs - traincraft runs [outdir] lists all runs; traincraft status <run-dir> shows per-stage state with live labeling progress read from receipts.jsonl - run_status/RunIndex exported in the public API (the base for the MCP/FastAPI service and the workbench) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
- service/core.py: shared, dependency-free ops (list/status/events/report/ manifest, TOML validation, submission — Slurm or detached local process) - traincraft serve: localhost FastAPI app with OpenAPI docs at /docs - traincraft mcp: the same six operations as MCP tools on stdio, with working rules (validate before submit, judge models only by the quality report) encoded in the tool docstrings - optional deps behind 'pixi install -e service'; new how-to page + CLI/API reference; roadmap updated Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
…ommand examples, colored runs/status output, --json for the inspect commands Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
…replicate, multi-frame file/conformer sources, every seed sampled The geometry stage now emits N seed structures and the sampling stage samples all of them (per-seed job dirs, pooled candidates, parent hash in provenance) instead of silently dropping everything but frame 0. Producers: replicate=N with derived per-replica seeds, smiles n_conformers>1, file index=":". build_geometry stays as the strict exactly-one convenience. Prerequisite for diffusion-model sources. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V6f4Z4uLdysBeehYfbQ56k
…queued in the status ladder, shard-aware label progress Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…over an SSH alias, with a fake ssh/scp/sbatch/sacct test harness Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…solved config snapshot + inputs shipped to the cluster, per-stage submitted events, kill-on-invalid-dep The local run dir becomes a mirror (scripts, submission events); the remote run dir at remote_root/<run.name> is the truth the jobs write. dumps_config round-trips the snapshot (exclude_none only: discriminator type fields are Literal defaults and must survive). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
… remote events/receipts ingest into the local mirror, failed events for queue-killed jobs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…lurm job array + merge job, per-shard single-writer journal dirs Shard tasks label frames[i::n] into labeled_dft/shard_XX/ (own work/, receipts, journal — the single-writer invariant holds per dir) and publish nothing; the merge job assembles journals by fingerprint, records misses as failures (never recomputes DFT in its small allocation), and emits the stage's events/artifact/key. shards lives on SlurmStage so changing it never invalidates the label cache key. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…d the label_merge job stays out of the planned-stages list (found by live fake-cluster smoke test) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
…ow-to, config/cli reference, agent skill recipes, roadmap tick + multi-cluster follow-up Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Single-cluster remote execution on top of the existing Slurm executor:
~/.traincraft/clusters/*.toml) gainhost(SSH alias) +remote_root:traincraft submitnow works from a laptop/VM. The run lives atremote_root/<run.name>on the cluster (a resolved config snapshot + referenced input files are shipped there); the local run dir becomes a mirror (rendered scripts, submission events, pulled state).$SCRATCH/~inremote_rootexpand on the remote shell, never locally.submittedevents with job ids;traincraft statusgains aqueuedstate. Submission uses--kill-on-invalid-dep=yesso a failed stage takes its dependents down instead of leaving them pending forever.traincraft watch <config|run-dir> [--interval N] [--once]— re-entrant poll loop (no daemon): ingests the remoteevents.jsonl+ labeling receipts into the mirror (exact-line dedup), pollssacct(job-array aware), and recordsfailedevents for jobs the queue killed (OOM/timeout/cancel) that never got to log their own failure. Exit 0/1/3.[orchestration.slurm.stages.label] shards = Nrenders a Slurm job array (traincraft stage label CONFIG --shard I:N, round-robin frames, per-shard single-writer journal dirs underlabeled_dft/shard_XX/) plus a small merge job (--merge-shards: assembles journals by fingerprint, records misses as failures, never recomputes DFT). Retry = resubmit shards; the journals make reruns incremental.shardsis execution-only config and never invalidates the label cache key.Design invariants kept
events.jsonlis written only by remote stage processes; the mirror only by local submit/watch (which appends a failure only once the job is provably dead). Shard tasks write no events — receipts are their progress record.host→ identical local sbatch flow;shardsunset → renderer output unchanged;engine="local"untouched. Existingtest_slurm_executor.pyassertions pass unmodified.Transportis constructed per cluster config; the watch pass isingest → poll → act; the snapshot shipper is per-(cluster, run).Testing
ssh/scp/sbatch/sacctshim harness (tests/conftest.py) runs the real code paths end-to-end against a tmp-path "cluster" — no scheduler or network.--shard 0:2/1:2/--merge-shards), watched it torun completed. The smoke test caught two real bugs (stale stage error text surviving a rerun; the merge job leaking into planned stages) — both fixed with regression tests.🤖 Generated with Claude Code
https://claude.ai/code/session_017RmprSjfXNtRV84X9cdkwS