Examples¶
Interactive notebooks grouped by purpose: Tutorials walk through a topic step-by-step, while How-to Guides solve a specific task. Each notebook is available in two formats: View for static reading, and Open in marimo for an interactive notebook that runs in the marimo playground.
Tutorials¶
-
OptunaSearchCV Quickstart
Run a fast hyperparameter search and read the best parameters and score.
How-to Guides¶
-
How to Stop Optimization Early with Callbacks
Stop unneeded work early by adding Optuna callbacks to your search.
-
How to Choose and Configure a Sampler
Control the optimization algorithm and get reproducible results with Optuna samplers.
-
How to Handle Failing Trials
Control what happens when a hyperparameter combination causes fitting to fail.
-
How to Route Sample Weights Through OptunaSearchCV
Pass sample_weight through OptunaSearchCV to both fitting and scoring.
-
How to Tune Pipeline Parameters
Tune hyperparameters across multiple pipeline steps with OptunaSearchCV.
-
How to Score Multiple Metrics
Evaluate hyperparameter configurations against multiple scoring metrics at once.
-
How to Resume Optimization from Prior Trials
Reuse an Optuna study to continue optimization runs and keep experiments reproducible.
-
How to Visualize Optimization History
Plot optimization progress and parameter relationships from a completed search.
Running Examples Locally¶
All examples are marimo notebooks. Open any example interactively:
# Via just (pass the filename without .py)
just example quickstart
just example callbacks
# Or directly with marimo
uv run marimo edit examples/quickstart.py
Next Steps¶
- Browse the API Reference for detailed documentation
- Read Concepts and Architecture to understand the design