Source coverage
Coverage claim
This documentation project inventories:
- all implementation modules under
src/speedtronic(v1 plus v2); - every top-level class and function;
- every direct class method;
- module constants and compatibility aliases;
- all v1 and v2 test functions in the repository;
- both shipped YAML configurations;
- both shipped examples;
- package metadata, source manifest, license, and ignore rules through the operational pages.
The exhaustive AST listing is generated during npm run build and appears as Generated Source Inventory.
Build-time coverage gate
scripts/validate_coverage.py fails the build when:
- a Python implementation file is absent from the generated inventory;
- a top-level class/function or class method lacks a generated anchor;
- a test file or test function is absent;
- a shipped config or example is absent;
- a documentation page is not represented in the sidebar.
The source inventory generator uses ast.parse; it does not import Speedtronic, load PyTorch, read credentials, or access the network.
Implementation module map
| Module | Responsibility | Curated page |
|---|---|---|
__init__.py | Eager/lazy public exports and version | Generated inventory |
__main__.py | python -m speedtronic | CLI |
config.py | Dataclasses, parsing, defaults, redaction | Configuration |
runtime.py | Composition helpers | Runtime and Trainer |
trainer.py | Optimization loop and state | Runtime and Trainer |
data.py | Tokenizers, datasets, collators, loader | Data |
model.py | Reference transformer | Reference Model |
registry.py | Model factory registry | Extensions |
precision.py | Device and precision capability | Precision |
checkpoint.py | Atomic persistence and RNG | Checkpoints |
profiling.py | Metrics and callbacks | Observability |
hooks.py | Event wrapper | Observability |
integrations.py | W&B and TensorBoard adapters | Observability |
module_utils.py | Gradient-checkpointing helper | Extensions |
cli.py | Argument parser and command dispatch | CLI |
distributed/__init__.py | Distributed re-exports | DumbDiLoCo overview |
distributed/diloco.py | Master/worker coordinator | Coordinator |
distributed/hub.py | Hub file transport and retries | Hub Transport |
distributed/outer.py | Outer optimizer and master loop | Outer Loop |
distributed/tensors.py | Safetensors and delta wire format | Tensor Format |
optimizers.py | Hybrid Muon, Muon+, cautious wrapper, routing | v2 Optimizers |
shapes.py | Startup shape profiles and warnings | Shape Validation |
scheduling.py | CUDA stage streams and OOO fallback | OOO Backprop |
Supporting file map
| File | Coverage |
|---|---|
README.md | User overview reconciled against implementation in all pages |
pyproject.toml | Packaging |
MANIFEST.in | Packaging |
LICENSE | Apache-2.0 summary and glossary |
.gitignore | Generated/artifact guidance in operations pages |
configs/smoke.yaml | Shipped Configs |
configs/v2_smoke.yaml | Shipped Configs |
configs/diloco.yaml | Shipped Configs |
CHANGELOG.md | Release and deferred-decision record |
.github/workflows/ci.yml | Python, documentation, and distribution gates |
examples/train_reference.py | Shipped Examples |
examples/diloco_master.yaml | Shipped Examples |
Evidence labels
| Label | Meaning |
|---|---|
| Verified by tests | Directly asserted by a repository test |
| Example exercised | Present in a shipped runnable configuration or Python example |
| Implementation-derived | Read directly from source but not directly tested |
| External dependent | Requires real CUDA, MPS, compilation, filesystem failure, or Hub networking |
Documentation completeness does not imply every documented path is tested. The test map makes that distinction explicit.