SkyPilot setup with marimo, Pydantic and PyTorch

Learn how to turn a marimo PyTorch notebook into a command-line training job, then use SkyPilot to queue 30 experiments with Weights & Biases logging.

Player not loading? Watch on YouTube

The presenter builds a PyTorch training workflow that starts locally and extends to remote compute through SkyPilot. A Pydantic model holds settings such as learning rate, epoch count and network dimensions. The same configuration supplies defaults, validates command-line inputs and feeds the training loop, so the notebook and terminal entry point share one definition.

The setup uses marimo notebooks stored as Python files. The presenter reads command-line arguments into the configuration and generates a help table from Pydantic's JSON schema with Rich. Inline dependency declarations let uv install the script's dependencies when it runs. The example trains a network to approximate an identity function; it is a workflow demonstration rather than a model quality benchmark.

For remote execution, a SkyPilot YAML file specifies resources, a working directory, setup commands and the training command. A separate notebook uses the Python SDK to vary layer counts and input sizes, pass a Weights & Biases API key and submit 30 jobs. The presenter checks provisioning, job states and logs in SkyPilot, then reviews experiment results in Weights & Biases.

The cloud setup requires a configured provider connection. The presenter also discusses GPU requests, spot-instance searches and Kubernetes support, but does not walk through those configurations.