/comet:comet-viewsfrom comet
Build and update Comet dashboard views and panels in code with comet_ml.views - project views and per-experiment views made of sections of line, bar, scatter, parallel-coordinates, scalar, image, data-table, Python (Streamlit) and JavaScript panels, plus filters and experiment-table settings - save them with API.create_view / update_view, and inspect, copy, standardize or harvest views across projects. Includes a local test harness for JavaScript panels. Use for "make a dashboard for this project", "add a loss chart to the view", "build a sweep view", "write a custom JavaScript panel", "create a Python panel", "copy this view to another project", "put the same view on every project". Not for logging the data the panels show (use comet-experiments) or for answering questions from the data (use comet-query).
Ships in comet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A view is a saved dashboard layout. Project views show many experiments
(the project page). Experiment views lay out one run's page. A view holds
sections; each section holds panels. comet_ml.views builds views
with no network calls; API saves them.
References:
comet_ml/views.py documents the saved JSON schema.python -c "import comet_ml; print(comet_ml.__version__)" must be 3.59.0
or later. Otherwise ask the user to pip install -U comet-ml.get_project_logged_item_names tool or
the newest runs' exp.get_metrics_summary() (api.get_query_variables
can lag minutes behind new metrics). Do not guess names like val_loss
versus validation_loss.api.get_views, describe_view) before
changing any.update_view) needs the user's go-ahead.import comet_ml
from comet_ml.views import (
Section, build_view, line_panel, scalar_panel, parallel_panel, bar_panel,
)
api = comet_ml.API()
workspace = api.get_default_workspace()
view = build_view(
"Training overview",
sections=[
Section("At a glance", [
scalar_panel("val_acc", aggregation="max", name="Best val acc"),
scalar_panel("val_loss", aggregation="min", name="Best val loss"),
]),
Section("Curves", [
line_panel(["train_loss", "val_loss"], x="step", smoothing=0.6),
line_panel("val_acc"),
], columns=2),
Section("Sweep", [
parallel_panel(params=["lr", "batch_size"], metrics=["val_loss"],
target="val_loss"),
bar_panel("val_acc", aggregation="max"),
], columns=2),
],
)
created = api.create_view(workspace, "my-project", view)
Section(title, panels, columns=3, expanded=True, height=1) flows panels
left to right in 1, 2 or 3 columns; height is 1 to 3 grid rows.create_view raises ViewNameTakenError if the project already has a
view with that name. Choose a new name or update instead.existing = next(v for v in api.get_views(workspace, "my-project")
if v.name == "Training overview")
view = build_view("Training overview", sections=[...])
view.template_id = existing.template_id
api.update_view(workspace, "my-project", view)
update_view replaces the whole layout. Read the current one first with
comet_ml.views.describe_view(existing) and keep the panels the user did not
ask to change.
Same sections and panels, different builder and save call:
from comet_ml.views import Section, build_experiment_view, line_panel
exp = api.get_experiment_by_key(KEY)
view = build_experiment_view("Run layout",
sections=[Section("Curves", [line_panel(["loss"])])])
exp.create_view(view) # or exp.update_view(view) with template_id set
Passing a project view to an experiment save call (or the reverse) raises
ValueError: the server would store it but render no panels.
| Factory | Shows |
|---|---|
line_panel(metric_or_list, x="step", smoothing=0, transform_y=None, legend=None, locked=False) | Metric curves; x can be "step", "epoch", "duration", "wall" or a metric; locked=True keeps its own settings |
bar_panel(metric, aggregation="last", plot_type="bar", group_by=None) | One bar per experiment; plot_type="box"/"violin" with group_by=<param> for distributions |
scatter_panel(x, y, z=None, params=, metrics=) | One point per experiment; z makes it 3D |
parallel_panel(params, metrics=(), target="") | Hyperparameter sweeps |
scalar_panel(metric, aggregation="last") | One big number |
image_panel(images=(), step=None) | Logged images across experiments |
data_panel(file_name) | A logged table asset (CSV) |
javascript_panel(code, html=, css=, resources=) | Custom JavaScript, stored in the view |
python_panel(code=... or template_id=...) | Custom Python (Streamlit), rendered server-side |
custom_panel(instance_id) | An existing Panel-library JavaScript panel instance |
legend_key(value, label, source) | Legend entries, e.g. legend_key("penalty", source="params") |
Aggregations: last, first, min, max, mean, median, sum,
count, stddev and more (the Aggregation type in views.py lists them;
an unknown value raises ValueError). Prefer built-in panels; use
JavaScript or Python panels only when no built-in panel shows what is needed.
examples/views/migrate_views.py (create_view applies as_portable();
skip "Unsaved Changes" views; existing names are skipped).examples/views/standardize_workspace.py.examples/views/harvest_panels.py.All three are dry runs unless given --apply. They touch other projects:
confirm the scope with the user first.
comet-mcp (1.5 or later) has list_views, create_javascript_panel,
get_javascript_panel and update_javascript_panel. Use them for
JavaScript panels when the MCP is connected; use the SDK for everything else
in this skill.
Tested end to end against a Comet server; each prints a summary: line and checks its own result.
examples/views/inspect_views.py: read views before changing themexamples/views/build_view.py: every built-in panel type, filter, table, create-then-updateexamples/views/experiment_view.py: the layout on each run's own pageexamples/views/custom_panels.py: Python (Streamlit) panels inline and from the Panel library, plus a JavaScript panelexamples/views/javascript_panels.py: save tested JavaScript panels from .js filesexamples/views/javascript/test_panels.mjs: test JavaScript panels locally against real experimentsexamples/views/standardize_workspace.py: one view across many projectsexamples/views/harvest_panels.py: collect code panels into a gallery viewexamples/views/migrate_views.py: copy views between projects or accountscreate_view repeatedly while iterating: each call adds a view.
Create once, then update_view.test_panels.mjs catches most failures in seconds).What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub comet-ml/comet-python-sdk --plugin comet5 skills in this plugin
/comet-experimentsAdd Comet experiment tracking to ML code and run it - create experiments with comet_ml.start(), log parameters, metrics, curves, images, tables, confusion matrices, models and artifacts, use framework autologging (PyTorch, Keras, sklearn, XGBoost, LightGBM, ...), run sweeps with the Comet Optimizer, work offline, and report the experiment URL. Use for "track this training run in Comet", "log metrics to Comet", "add comet_ml to my script", "run an experiment", "sweep these hyperparameters", "register this model". Not for reading past runs (use comet-query) or building dashboards (use comet-views)./comet-mlReference for the Comet ML Python SDK (comet_ml) - credentials and configuration, self-hosted servers, the object model (Experiment, API, APIExperiment, View, Artifact, Model), and how to look up exact signatures in the SDK source. Use for "how do I configure comet", "which comet_ml class does X", "what's the signature of log_X", "is my Comet key set up". For running experiments use comet-experiments; for views and panels use comet-views; for answering questions from Comet data use comet-query; for the model registry use comet-registry./comet-queryAnswer questions from a Comet server's data - find, filter and compare experiments, read metrics, curves, hyperparameters, tags, system info, logs, code and assets, list projects and workspaces, and look up registered models. Uses the Comet MCP server when connected, else comet_ml.API scripts. Use for "which run had the best val accuracy", "compare these experiments", "what learning rate did run X use", "show me the loss curve", "how many experiments are in project Y", "what changed between the last two runs", "which model version is in production". Read-only. Not for logging new runs (use comet-experiments) or building dashboards (use comet-views).