marimo-batch
Prepare marimo notebooks for scheduled batch execution with CLI parameters and optional experiment tracking.
- Converts UI-based parameters into Pydantic models that support both interactive forms and command-line argument parsing
- Enables dual-mode execution: iterate with the UI, then run batch jobs via CLI with arguments like
--sample-size 4096 --learning-rate 0.005 - Optionally integrates Weights and Biases for experiment logging and parameter tracking
- Includes EnvConfig for managing environment variables and API keys with optional validators
- Preserves notebook column layouts and structure during modifications
Pydantic is a great way to declare a source of truth for a batch job, especially for ML. You can declare something like:
from pydantic import BaseModel, Field
class ModelParams(BaseModel):
sample_size: int = Field(
default=1024 * 4, description="Number of training samples per epoch."
)
learning_rate: float = Field(default=0.01, description="Learning rate for the optimizer.")
You can fill these model params with two methods too, you can imagine a form in the UI.
More from marimo-team/skills
marimo-notebook
Write a marimo notebook in a Python file in the right format.
2.5Kanywidget-generator
Generate anywidget components for marimo notebooks.
1.4Kjupyter-to-marimo
Convert a Jupyter notebook (.ipynb) to a marimo notebook (.py).
1.3Kwasm-compatibility
Check if a marimo notebook is compatible with WebAssembly (WASM) and report any issues.
1.1Kimplement-paper
Implement a research paper as an interactive marimo notebook together with the user. Start by understanding what the user wants to explore, fetch the paper via alphaxiv, then build a focused notebook.
885add-molab-badge
Add "Open in molab" badge(s) linking to marimo notebooks. Works with READMEs, docs, websites, or any markdown/HTML target.
769