This repository shows how to adapt the standard Burn MNIST example into a Tracel SDK project. It is a single executable that trains the model and reports the experiment (metrics, checkpoints, and artifacts) to Tracel.
- defining a custom model artifact with
BundleEncodeandBundleDecode - exposing training configuration through
MnistTrainingConfig - creating and running an experiment with
Context::cloud()andExperimentRun - wiring metrics, checkpoints, and interruption handling through
ExperimentRun
src/main.rs: entry point that opens a cloudContext, creates theMNIST_Trainingexperiment, and runs itsrc/training.rs: training loop, evaluation, and artifact uploadsrc/model.rs: model definition and artifact bundle serializationsrc/data.rs: MNIST batching and data augmentation
Context::cloud() needs Tracel credentials. Either set TRACEL_API_KEY in your environment, or authenticate once with:
tracel loginThe project's namespace and name come from tracel.toml. By default the example uses the FlexDevice backend; optional backends can be enabled with Cargo features.
cargo run
cargo run --features wgpu
cargo run --features cudaThe run is reported as the MNIST_Training experiment.
- Tracel SDK docs: docs.rs/tracel