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 271692610522960083605784088307679298913 lr-regularization-1.0e-07 2026-04-30T11:50:59.624156+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.682846 0.984122 0.098884 0.062001 None None None None None
1 105740856719690226206709377693101769809 lr-regularization-2.9e-07 2026-04-30T11:50:59.961037+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.682710 0.984122 0.098925 0.054140 None None None None None
2 285539499092396579611819982605296449893 lr-regularization-8.6e-07 2026-04-30T11:51:00.270092+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.682313 0.984122 0.094620 0.063088 None None None None None
3 116400262161192563184757582935042231911 lr-regularization-2.5e-06 2026-04-30T11:51:00.588825+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.681153 0.984122 0.094470 0.047832 None None None None None
4 247105970899819443446608087143117765503 lr-regularization-7.4e-06 2026-04-30T11:51:00.865624+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.677790 0.984122 0.082088 0.051483 None None None None None
5 328528035354860533273963343093411284751 lr-regularization-2.2e-05 2026-04-30T11:51:01.151953+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.668210 0.984122 0.081639 0.054003 None None None None None
6 203698431914299296253700257371296331731 lr-regularization-6.3e-05 2026-04-30T11:51:01.453884+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.642328 0.985075 0.086901 0.054173 None None None None None
7 52829089585668783290735274114279097771 lr-regularization-1.8e-04 2026-04-30T11:51:01.754324+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.581579 0.985392 0.086713 0.053941 None None None None None
8 275506235325590191315915558605893073560 lr-regularization-5.4e-04 2026-04-30T11:51:02.051800+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.476411 0.985710 0.086497 0.054455 None None None None None
9 90793713195048709728929236423049124409 lr-regularization-1.6e-03 2026-04-30T11:51:02.350613+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.355309 0.987615 0.087495 0.049176 None None None None None
10 70349256814426157559213596790926558477 lr-regularization-4.6e-03 2026-04-30T11:51:02.652920+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.252513 0.990156 0.096686 0.057630 None None None None None
11 175117142157411499657580235140924725297 lr-regularization-1.4e-02 2026-04-30T11:51:02.970030+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.178052 0.992379 0.088074 0.053589 None None None None None
12 41739432927435735900995269862148007421 lr-regularization-4.0e-02 2026-04-30T11:51:03.268913+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.128754 0.995872 0.088216 0.053649 None None None None None
13 29068764257991844949874656259110196677 lr-regularization-1.2e-01 2026-04-30T11:51:03.601674+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.098897 0.996189 0.124105 0.066333 None None None None None
14 198062656510429879827773196163157776088 lr-regularization-3.4e-01 2026-04-30T11:51:03.918295+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.083941 0.995872 0.090259 0.059797 None None None None None
15 174714875495834445635179677317963597058 lr-regularization-1.0e+00 2026-04-30T11:51:04.328604+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.080457 0.995554 0.186593 0.053436 None None None None None
16 185328608747926540323439092007237714644 lr-regularization-2.9e+00 2026-04-30T11:51:04.621626+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.089466 0.994601 0.086560 0.052533 None None None None None
17 52859448295347070239286976641836523388 lr-regularization-8.6e+00 2026-04-30T11:51:04.916909+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.104241 0.993649 0.088163 0.052383 None None None None None
18 240439142197468231477410497826314273685 lr-regularization-2.5e+01 2026-04-30T11:51:05.212190+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.121671 0.992379 0.090069 0.053581 None None None None None
19 290221280591060176092957306010626532438 lr-regularization-7.4e+01 2026-04-30T11:51:05.508597+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.142282 0.991426 0.089197 0.052080 None None None None None
20 196885528799010525714935012120480242445 lr-regularization-2.2e+02 2026-04-30T11:51:05.805994+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.162450 0.991426 0.092885 0.052772 None None None None None
21 269910979035768389334005588226437745197 lr-regularization-6.3e+02 2026-04-30T11:51:06.106342+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.204586 0.991108 0.094156 0.054360 None None None None None
22 273168639879024955043767331892334650573 lr-regularization-1.8e+03 2026-04-30T11:51:06.369388+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.291953 0.990473 0.060293 0.032807 None None None None None
23 131835965717469418215829981175592444102 lr-regularization-5.4e+03 2026-04-30T11:51:06.563450+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.471382 0.989838 0.061014 0.033623 None None None None None
24 21622120584003305274687599784922941185 lr-regularization-1.6e+04 2026-04-30T11:51:06.771660+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 0.796526 0.983169 0.071383 0.033822 None None None None None
25 167304291692937273996782691424872820620 lr-regularization-4.6e+04 2026-04-30T11:51:06.978591+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.133167 0.984757 0.070677 0.034186 None None None None None
26 99948939942351731052632123465912405360 lr-regularization-1.4e+05 2026-04-30T11:51:07.186596+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.229179 0.985551 0.071505 0.034650 None None None None None
27 190157760102987964298052411177663895154 lr-regularization-4.0e+05 2026-04-30T11:51:07.402861+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.276041 0.985869 0.070951 0.033951 None None None None None
28 224319153825701072417328029336398599538 lr-regularization-1.2e+06 2026-04-30T11:51:07.606723+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.447319 0.975865 0.069598 0.033093 None None None None None
29 205956125384632278570878575496712013105 lr-regularization-3.4e+06 2026-04-30T11:51:07.830822+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.448698 0.976500 0.067941 0.033771 None None None None None
30 6177555830103179008770208277906796433 lr-regularization-1.0e+07 2026-04-30T11:51:08.038749+00:00 LogisticRegression binary-classification estimator 9f4622fc73c9ccd9bc3725923827edeb None 1.897034 0.976183 0.070984 0.036970 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, '271692610522960083605784088307679298913') to (30, '6177555830103179008770208277906796433')
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.124105 0.090259 0.186593 0.086560
Predict time (s) 0.034160 0.033081 0.033231 0.033419


_ = 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.947 seconds)

Gallery generated by Sphinx-Gallery