Share an Optuna dashboard
A sweep produces exactly one interesting sentence — learning rate mattered, the rest was noise — and the evidence for it is three Plotly figures inside a local dashboard nobody else can reach.
Concatenate the three plots into one file
import optuna
from optuna.visualization import (
plot_optimization_history, plot_param_importances, plot_parallel_coordinate,
)
study = optuna.load_study(study_name="lr-sweep", storage="sqlite:///study.db")
figs = [
plot_optimization_history(study),
plot_param_importances(study),
plot_parallel_coordinate(study),
]
with open("optuna.html", "w") as f:
for i, fig in enumerate(figs):
f.write(fig.to_html(
full_html=(i == 0),
include_plotlyjs="inline" if i == 0 else False,
))
Inline plotly.js once, on the first figure only — that is what keeps the page self-contained without tripling its size.
Drag the result into the app, or publish from the sweep job:
curl -fsS -X PATCH "https://commareports.com/api/v1/reports/$REPORT_ID" \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html optuna.html \
--arg title "lr-sweep — $(date +%F)" '{title: $title, html: $html}')"
Why it beats pasting the best params
The best trial is a line of JSON. Whether to trust it depends on the shape of the search — whether the optimum sits on a boundary, whether importance is concentrated, whether half the trials pruned early. That is what the plots show, and what a thread can be attached to:
- Anchored threads — "the best value is at the edge of the range, widen it" sits on the plot. See commenting on HTML.
- Revisions — one report id per study; every publish is kept.
- Access per report — private, team-only, or domain-gated. See the sharing model.
Limits
- Entry HTML: 5 MB. Inlined plotly.js is roughly 3 MB; a study with tens of thousands of trials should be filtered before plotting parallel coordinates.
- Assets: 25 MB per file, 250 MB and 500 files per report.
- 60 requests/minute per token.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited revision history.