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>
17 lines
321 B
TOML
17 lines
321 B
TOML
[project]
|
|
name = "swactor-dp-mnist"
|
|
version = "0.1.0"
|
|
requires-python = ">=3.9"
|
|
dependencies = [
|
|
"swactor",
|
|
"torch",
|
|
"torchvision",
|
|
"numpy",
|
|
]
|
|
|
|
[tool.uv.sources]
|
|
swactor = { path = "../swactor-python", editable = true }
|
|
|
|
[[tool.uv.index]]
|
|
name = "pytorch-cpu"
|
|
url = "https://download.pytorch.org/whl/cpu"
|