Local skore Project#

This example shows how to use Project in local mode: store reports on your machine and inspect them. A key point is that summarize() returns a Summary, which is a pandas.DataFrame. In Jupyter you get an interactive widget, but you can always inspect and filter the summary as a DataFrame if you prefer.

Create a local project and store reports#

We use a temporary directory as the workspace so the example is self-contained. In practice you can omit workspace to use the default (e.g. a skore/ directory in your user cache).

from pathlib import Path
from tempfile import TemporaryDirectory

from skore import Project

tmp_dir = TemporaryDirectory()
tmp_path = Path(tmp_dir.name)
project = Project("example-project", workspace=tmp_path)
from sklearn.datasets import load_breast_cancer
from sklearn.linear_model import LogisticRegression
from skrub import tabular_pipeline

X, y = load_breast_cancer(return_X_y=True, as_frame=True)
estimator = tabular_pipeline(LogisticRegression(max_iter=1_000))
import numpy as np
from sklearn.base import clone
from skore import evaluate

for regularization in np.logspace(-7, 7, 31):
    report = evaluate(
        clone(estimator).set_params(logisticregression__C=regularization),
        X,
        y,
        splitter=0.2,
        pos_label=1,
    )
    project.put(f"lr-regularization-{regularization:.1e}", report)

Summarize: you get a DataFrame#

summarize() returns a Summary, which subclasses pandas.DataFrame. In a Jupyter environment it renders an interactive parallel-coordinates widget by default.

summary = project.summarize()

To see the normal DataFrame table instead of the widget (e.g. in scripts or when you prefer the table), wrap the summary in pandas.DataFrame:

import pandas as pd

pandas_summary = pd.DataFrame(summary)
pandas_summary
key date learner ml_task report_type dataset rmse log_loss roc_auc fit_time predict_time rmse_mean log_loss_mean roc_auc_mean fit_time_mean predict_time_mean
id
0 307862713369513384122340672343784091509 lr-regularization-1.0e-07 2026-04-29T16:09:43.595961+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.682846 0.984122 0.084666 0.052542 None None None None None
1 72300269779018014322538223969888188142 lr-regularization-2.9e-07 2026-04-29T16:09:43.890022+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.682710 0.984122 0.084336 0.051357 None None None None None
2 317267696953940985493885183284663009509 lr-regularization-8.6e-07 2026-04-29T16:09:44.187441+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.682313 0.984122 0.087762 0.055632 None None None None None
3 89434007882337542663992991099321321875 lr-regularization-2.5e-06 2026-04-29T16:09:44.490951+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.681153 0.984122 0.086014 0.053638 None None None None None
4 169240593754696919966411725727622801751 lr-regularization-7.4e-06 2026-04-29T16:09:44.789697+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.677790 0.984122 0.086058 0.053008 None None None None None
5 115062531627001553764758614174165613951 lr-regularization-2.2e-05 2026-04-29T16:09:45.084767+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.668210 0.984122 0.085970 0.053650 None None None None None
6 282372804303398372513142487516799519458 lr-regularization-6.3e-05 2026-04-29T16:09:45.382858+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.642328 0.985075 0.086744 0.054688 None None None None None
7 222957049904136159831665466512698294301 lr-regularization-1.8e-04 2026-04-29T16:09:45.682922+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.581579 0.985392 0.086600 0.054060 None None None None None
8 12429702799072986260156164812757418341 lr-regularization-5.4e-04 2026-04-29T16:09:45.983501+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.476411 0.985710 0.086738 0.063812 None None None None None
9 172771347977912884423250045581195051750 lr-regularization-1.6e-03 2026-04-29T16:09:46.335878+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.355309 0.987615 0.104764 0.061421 None None None None None
10 47478329694633176300697091612767366729 lr-regularization-4.6e-03 2026-04-29T16:09:46.642744+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.252513 0.990156 0.077792 0.049887 None None None None None
11 67454727598363893156640957522416290359 lr-regularization-1.4e-02 2026-04-29T16:09:46.862699+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.178052 0.992379 0.055372 0.033499 None None None None None
12 152554943822159127437400371378631139767 lr-regularization-4.0e-02 2026-04-29T16:09:47.062879+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.128754 0.995872 0.055497 0.033662 None None None None None
13 20758909240931351899264256229843972439 lr-regularization-1.2e-01 2026-04-29T16:09:47.279634+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.098897 0.996189 0.080498 0.034187 None None None None None
14 177253022518991813990160134833781605440 lr-regularization-3.4e-01 2026-04-29T16:09:47.475020+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.083941 0.995872 0.057596 0.038265 None None None None None
15 121754851089765931132411348294051522607 lr-regularization-1.0e+00 2026-04-29T16:09:47.746135+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.080457 0.995554 0.126074 0.035837 None None None None None
16 224976678747127048765556762363666044620 lr-regularization-2.9e+00 2026-04-29T16:09:47.949530+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.089466 0.994601 0.058603 0.034421 None None None None None
17 2507230742836466766336310476342430538 lr-regularization-8.6e+00 2026-04-29T16:09:48.144224+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.104241 0.993649 0.056640 0.034372 None None None None None
18 133980706858289172307339372537655710626 lr-regularization-2.5e+01 2026-04-29T16:09:48.338923+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.121671 0.992379 0.057423 0.034004 None None None None None
19 252623136459884386978309948730034969924 lr-regularization-7.4e+01 2026-04-29T16:09:48.535936+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.142282 0.991426 0.060576 0.035210 None None None None None
20 112423665264228725084358503434888329487 lr-regularization-2.2e+02 2026-04-29T16:09:48.751024+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.162450 0.991426 0.064800 0.053385 None None None None None
21 237100718933020661116656362033009607060 lr-regularization-6.3e+02 2026-04-29T16:09:49.063828+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.204586 0.991108 0.098506 0.055777 None None None None None
22 267623986587846697893502992369688874180 lr-regularization-1.8e+03 2026-04-29T16:09:49.392839+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.291953 0.990473 0.101991 0.054837 None None None None None
23 271646794980916538122290848300007899563 lr-regularization-5.4e+03 2026-04-29T16:09:49.713779+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.471382 0.989838 0.103231 0.056033 None None None None None
24 325394858534058471977026928761016439320 lr-regularization-1.6e+04 2026-04-29T16:09:50.046681+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.796526 0.983169 0.114313 0.055179 None None None None None
25 32163775526283497612584165209502114930 lr-regularization-4.6e+04 2026-04-29T16:09:50.381404+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.133167 0.984757 0.118067 0.056244 None None None None None
26 25023344105609492707148849540188730748 lr-regularization-1.4e+05 2026-04-29T16:09:50.722451+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.229179 0.985551 0.119369 0.056330 None None None None None
27 33555221866672967420353558588594504875 lr-regularization-4.0e+05 2026-04-29T16:09:51.063756+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.276041 0.985869 0.117273 0.052361 None None None None None
28 242212987094220930269024975725612032276 lr-regularization-1.2e+06 2026-04-29T16:09:51.383095+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.447319 0.975865 0.112137 0.053127 None None None None None
29 138238230049298706784819690412196226769 lr-regularization-3.4e+06 2026-04-29T16:09:51.675630+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.448698 0.976500 0.068272 0.035832 None None None None None
30 300877653742059185753650029830094924136 lr-regularization-1.0e+07 2026-04-29T16:09:51.896858+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.897034 0.976183 0.075861 0.039563 None None None None None


Basically, our summary contains metadata related to various information that we need to quickly help filtering the reports.

<class 'skore._project._summary.Summary'>
MultiIndex: 31 entries, (0, '307862713369513384122340672343784091509') to (30, '300877653742059185753650029830094924136')
Data columns (total 16 columns):
 #   Column             Non-Null Count  Dtype
---  ------             --------------  -----
 0   key                31 non-null     object
 1   date               31 non-null     object
 2   learner            31 non-null     category
 3   ml_task            31 non-null     object
 4   report_type        31 non-null     object
 5   dataset            31 non-null     object
 6   rmse               0 non-null      object
 7   log_loss           31 non-null     float64
 8   roc_auc            31 non-null     float64
 9   fit_time           31 non-null     float64
 10  predict_time       31 non-null     float64
 11  rmse_mean          0 non-null      object
 12  log_loss_mean      0 non-null      object
 13  roc_auc_mean       0 non-null      object
 14  fit_time_mean      0 non-null      object
 15  predict_time_mean  0 non-null      object
dtypes: category(1), float64(4), object(11)
memory usage: 5.3+ KB

Filter reports by metric (e.g. keep only those above a given accuracy) and work with the result as a table.

summary.query("log_loss < 0.1")["key"].tolist()
['lr-regularization-1.2e-01', 'lr-regularization-3.4e-01', 'lr-regularization-1.0e+00', 'lr-regularization-2.9e+00']

Use reports() to load the corresponding reports from the project (optionally after filtering the summary).

reports = summary.query("log_loss < 0.1").reports(return_as="comparison")
len(reports.reports_)
4

Since we got a ComparisonReport, we can use the metrics accessor to summarize the metrics across the reports.

reports.metrics.summarize().frame()
Estimator LogisticRegression_1 LogisticRegression_2 LogisticRegression_3 LogisticRegression_4
Metric
Accuracy 0.947368 0.964912 0.964912 0.964912
Precision 0.942029 0.970149 0.970149 0.970149
Recall 0.970149 0.970149 0.970149 0.970149
ROC AUC 0.996189 0.995872 0.995554 0.994601
Log loss 0.098897 0.083941 0.080457 0.089466
Brier score 0.027157 0.024990 0.025149 0.026218
Fit time (s) 0.080498 0.057596 0.126074 0.058603
Predict time (s) 0.035041 0.033670 0.034234 0.036047


_ = reports.metrics.roc().plot(subplot_by=None)
ROC Curve Positive label: 1 Data source: Test set
project.delete("example-project", workspace=tmp_path)
tmp_dir.cleanup()

Total running time of the script: (0 minutes 9.786 seconds)

Gallery generated by Sphinx-Gallery