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 skore import train_test_split
from skrub import tabular_pipeline

X, y = load_breast_cancer(return_X_y=True, as_frame=True)
split_data = train_test_split(X=X, y=y, random_state=42, as_dict=True)
estimator = tabular_pipeline(LogisticRegression(max_iter=1_000))
╭────────────────────── HighClassImbalanceTooFewExamplesWarning ───────────────────────╮
│ It seems that you have a classification problem with at least one class with fewer   │
│ than 100 examples in the test set. In this case, using train_test_split may not be a │
│ good idea because of high variability in the scores obtained on the test set. We     │
│ suggest three options to tackle this challenge: you can increase test_size, collect  │
│ more data, or use skore's CrossValidationReport with the `splitter` parameter of     │
│ your choice.                                                                         │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────── ShuffleTrueWarning ─────────────────────────────────╮
│ We detected that the `shuffle` parameter is set to `True` either explicitly or from  │
│ its default value. In case of time-ordered events (even if they are independent),    │
│ this will result in inflated model performance evaluation because natural drift will │
│ not be taken into account. We recommend setting the shuffle parameter to `False` in  │
│ order to ensure the evaluation process is really representative of your production   │
│ release process.                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────╯
import numpy as np
from sklearn.base import clone
from skore import EstimatorReport

for regularization in np.logspace(-7, 7, 31):
    report = EstimatorReport(
        clone(estimator).set_params(logisticregression__C=regularization),
        **split_data,
        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 1b92268a9df1ed70aebdece3fe4ff701 lr-regularization-1.0e-07 2026-02-27T17:05:09.401067+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.662918 0.992509 0.065434 0.055540 None None None None None
1 ef32bc2670b788161e6350c3c208021e lr-regularization-2.9e-07 2026-02-27T17:05:09.564568+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.662790 0.992509 0.067681 0.053594 None None None None None
2 6a98a8f0b3ad353fa32500f7c421c746 lr-regularization-8.6e-07 2026-02-27T17:05:09.727960+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.662415 0.992509 0.068384 0.054194 None None None None None
3 70115350ad845f37d10d382b699e6710 lr-regularization-2.5e-06 2026-02-27T17:05:09.893596+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.661320 0.992509 0.068291 0.053888 None None None None None
4 88ea49c4050e2062d79a62dfdb95598d lr-regularization-7.4e-06 2026-02-27T17:05:10.060774+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.658141 0.992509 0.069239 0.053660 None None None None None
5 7e555474af1500a0dcedf0cf3b865cd7 lr-regularization-2.2e-05 2026-02-27T17:05:10.225092+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.649068 0.992509 0.068552 0.053263 None None None None None
6 3764be6aefcc81656585322e6ebe6b8a lr-regularization-6.3e-05 2026-02-27T17:05:10.387089+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.624398 0.992926 0.068005 0.053670 None None None None None
7 18b82fa71e0375c511e1871cf23a69a0 lr-regularization-1.8e-04 2026-02-27T17:05:10.551609+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.565558 0.993550 0.068164 0.053390 None None None None None
8 f89387133d7fc8cfe61121716e73c81c lr-regularization-5.4e-04 2026-02-27T17:05:10.716808+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.460542 0.994382 0.066938 0.053750 None None None None None
9 9ce7c367a7995c2533632c78924ac54e lr-regularization-1.6e-03 2026-02-27T17:05:10.881999+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.336408 0.996047 0.069056 0.053285 None None None None None
10 ddd8597eb1c97b28b0b18f1ba44ae365 lr-regularization-4.6e-03 2026-02-27T17:05:11.059112+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.231201 0.997087 0.067689 0.053198 None None None None None
11 bdbcbff0d21e3231b8bd4d37d4ea0e69 lr-regularization-1.4e-02 2026-02-27T17:05:11.228055+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.155570 0.998335 0.064722 0.053013 None None None None None
12 33825ae523cdde5c4b9f09232fa78187 lr-regularization-4.0e-02 2026-02-27T17:05:11.388124+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.105629 0.998752 0.065614 0.054754 None None None None None
13 7bc233d63743491927a385745e6c711d lr-regularization-1.2e-01 2026-02-27T17:05:11.555782+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.075737 0.998752 0.069993 0.053910 None None None None None
14 5bf1c9a31e02b4b85cb3a8b5f83d41fa lr-regularization-3.4e-01 2026-02-27T17:05:11.721549+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.060118 0.997919 0.069372 0.055582 None None None None None
15 29e058f20ddf9754b08d4f78e5102f1b lr-regularization-1.0e+00 2026-02-27T17:05:11.889662+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.054072 0.997919 0.070478 0.055199 None None None None None
16 ff409e176176a4eb2e1b8a56d2cc1541 lr-regularization-2.9e+00 2026-02-27T17:05:12.059584+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.055710 0.997711 0.072189 0.054473 None None None None None
17 bdfcb463541138658b85d1cc76e9f5b5 lr-regularization-8.6e+00 2026-02-27T17:05:12.226943+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.062825 0.997503 0.070331 0.054016 None None None None None
18 b3a8233a0f112b7bb2bcf10a5c39796b lr-regularization-2.5e+01 2026-02-27T17:05:12.392726+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.080178 0.996463 0.071732 0.053590 None None None None None
19 dd6b96a003c612e756763724b7b46f4c lr-regularization-7.4e+01 2026-02-27T17:05:12.561440+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.129576 0.993550 0.073150 0.053439 None None None None None
20 e47421412b393e047f64d51f1c6c1503 lr-regularization-2.2e+02 2026-02-27T17:05:12.732715+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.245208 0.990845 0.077211 0.053658 None None None None None
21 2f2aa1635fa270a97e122b2ad15c9898 lr-regularization-6.3e+02 2026-02-27T17:05:12.904001+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.450185 0.989180 0.075826 0.053286 None None None None None
22 f8b11c2ac44f44b3fd84ceb46e5adcaa lr-regularization-1.8e+03 2026-02-27T17:05:13.073469+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 0.737683 0.987516 0.075644 0.053327 None None None None None
23 0dd39cc5320adab86e8e77f228b48cab lr-regularization-5.4e+03 2026-02-27T17:05:13.247236+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 1.084853 0.987932 0.080041 0.053097 None None None None None
24 f2d5069f9f34cb6798a953d3c33b2904 lr-regularization-1.6e+04 2026-02-27T17:05:13.419528+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 1.617311 0.981794 0.077779 0.053643 None None None None None
25 c1b2a6892b61ca2ae569c8b90fe955ee lr-regularization-4.6e+04 2026-02-27T17:05:13.589788+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 1.903156 0.982418 0.075587 0.054162 None None None None None
26 3950a1337718b5702dbd4b0223920811 lr-regularization-1.4e+05 2026-02-27T17:05:13.768648+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 2.010251 0.982418 0.075720 0.053732 None None None None None
27 b012a97241c74370a5a6993046a05115 lr-regularization-4.0e+05 2026-02-27T17:05:13.961625+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 2.221514 0.981690 0.071588 0.053212 None None None None None
28 bfab2601d9b1cdb6deb3ef030f0c7cad lr-regularization-1.2e+06 2026-02-27T17:05:14.133379+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 2.268595 0.972950 0.076764 0.054134 None None None None None
29 b734b46f053ead272887df7a07bcbd6b lr-regularization-3.4e+06 2026-02-27T17:05:14.305724+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 2.268530 0.972950 0.075422 0.053332 None None None None None
30 2cab9dea8c0f89dc68dfa3ace1b27d6c lr-regularization-1.0e+07 2026-02-27T17:05:14.476420+00:00 LogisticRegression binary-classification estimator 0966e6e4b6a8c8bd5b0e6bd95f36939d None 2.268482 0.973159 0.075962 0.053479 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, '1b92268a9df1ed70aebdece3fe4ff701') to (30, '2cab9dea8c0f89dc68dfa3ace1b27d6c')
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', 'lr-regularization-8.6e+00', 'lr-regularization-2.5e+01']

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_)
6

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 LogisticRegression_5 LogisticRegression_6
Metric
Accuracy 0.993007 0.993007 0.993007 0.979021 0.972028 0.979021
Precision 0.988889 0.988889 0.988889 0.988636 0.988506 0.988636
Recall 1.000000 1.000000 1.000000 0.977528 0.966292 0.977528
ROC AUC 0.998752 0.997919 0.997919 0.997711 0.997503 0.996463
Brier score 0.016769 0.014335 0.013810 0.015269 0.017996 0.022795
Fit time (s) 0.069993 0.069372 0.070478 0.072189 0.070331 0.071732
Predict time (s) 0.041553 0.039339 0.039136 0.039219 0.040155 0.039970


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 6.566 seconds)

Gallery generated by Sphinx-Gallery