syvain-training-utils
Internal Syvain helpers for small, explicit ML training runs. No secret sauce here, just shared runtime, device-diagnostic, and checkpoint patterns.
Install
uv add syvain-training-utils
Runtime setup
from syvain_training_utils import (
generate_run_id,
require_torch_compile_toolchain,
select_device,
)
run_id = generate_run_id()
device = select_device()
require_torch_compile_toolchain()
Device smoke test
import json
from syvain_training_utils import run_device_smoke_test
report = run_device_smoke_test(require_cuda=True)
print(json.dumps({"smoke": report}, indent=2, sort_keys=True))
Checkpoint a training run
from syvain_training_utils import (
TrainingLoopState,
load_training_checkpoint_if_available,
save_model_checkpoint,
)
loop_state = TrainingLoopState(
global_step=global_step,
curriculum_stage=curriculum_stage,
curriculum_step=curriculum_step,
)
save_model_checkpoint(
object_store=object_store,
base_path=base_model_path,
experiment_slug=experiment_slug,
run_id=run_id,
model=model,
optimizer=optimizer,
scheduler=scheduler,
loop_state=loop_state,
checkpoint_label=f"step-{global_step:012d}",
)
resume = load_training_checkpoint_if_available(
object_store=object_store,
base_path=base_model_path,
model=model,
optimizer=optimizer,
scheduler=scheduler,
device=device,
)
The manifest remains a small pointer to the current checkpoint. Each checkpoint contains the model, optimizer, optional scheduler, and PyTorch RNG state needed by the common single-file training-run contract.
Release files for syvain-training-utils 0.0.170
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| syvain_training_utils-0.0.170.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| syvain_training_utils-0.0.170-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.7 kB
Release files / syvain_training_utils-0.0.170.tar.gz
| Download URL | syvain_training_utils-0.0.170.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
010f6ed95fe56941f3308acbebe9499020981310fac51f2b935428f403bac165
|
|
BLAKE2b-256 checksum How to use checksums |
8886bb1366d3b0c822f7f7f579763f57f6863cef833ed4eb8838e492fc92d8b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / syvain_training_utils-0.0.170-py3-none-any.whl
| Download URL | syvain_training_utils-0.0.170-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5f32433bbd3de8cba7b630e9e78a6e05437fa625c0f47765f6b57f121e95a3a
|
|
BLAKE2b-256 checksum How to use checksums |
d4164d007fc2f87bc0900b38f5eb7391d9074fd6e2ce10092aa57607517ce15d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|