unilab.training.soak¶
Resource and progress monitoring for long-duration training soaks.
The monitor deliberately uses /proc and nvidia-smi instead of importing
Torch: it must remain usable when the supervised trainer, its collector
subprocesses, and their accelerator contexts are the only CUDA owners. The
artifact is intended to be self-contained enough to diagnose a failed soak even
after all child processes have exited.
Functions
|
Run a command in its own process group and produce a soak artifact. |
|
Record source, GPU, software, and environment provenance. |
Exceptions
Raised when a supervised soak violates a fail-closed condition. |
- exception unilab.training.soak.SoakFailureError[source]¶
Bases:
RuntimeErrorRaised when a supervised soak violates a fail-closed condition.
- unilab.training.soak.runtime_snapshot(root)[source]¶
Record source, GPU, software, and environment provenance.
- unilab.training.soak.run_soak(*, command, progress_dir, output_path, sample_interval_seconds=5.0, startup_timeout_seconds=600.0, stale_progress_seconds=120.0, post_shutdown_grace_seconds=5.0, min_duration_seconds=0.0, cwd=None, env=None, metadata=None)[source]¶
Run a command in its own process group and produce a soak artifact.
progress_diris an owner-controlled training log directory. File growth is used as a backend-independent liveness signal; once progress is first observed, no file change forstale_progress_secondsfails the soak rather than allowing a deadlocked worker to run forever.