Add a data-parallel MNIST training example where swactor actors coordinate gradient averaging across workers. - crates/swactor-dp-mnist/worker.py: add `MnistNet` MLP and `MnistWorker` actor handling `train_batch`/`update`/`evaluate`/`save_model` over a sharded MNIST split with SGD - crates/swactor-dp-mnist/aggregator.py: add `Aggregator` actor that buffers per-worker gradients, averages them, fans out updates, then logs/evaluates on completion - crates/swactor-dp-mnist/run_training.py: spawn the Aggregator plus two MnistWorkers (identical initial weights, disjoint shards), run 750 rounds, and poll the inbox for `log`/`done` - crates/swactor-dp-mnist/pyproject.toml: declare torch/torchvision/numpy deps, an editable local `swactor` source, and the PyTorch CPU index - Cargo.toml: add a `[profile.bench]` retaining debug symbols (`debug = true`, `strip = false`) for profiling Signed-off-by: Zachery Aaron Shores-Chmielewski <zacheryasc@gmail.com>
9 lines
No EOL
188 B
Markdown
9 lines
No EOL
188 B
Markdown
# swactor-dp-mnist
|
|
Simple demonstration of data parallel training on CPU for MNIST
|
|
|
|
## usage
|
|
To run, from this directory:
|
|
```bash
|
|
python run_training.py
|
|
# uv run python run_training.py
|
|
``` |