Storing data science artifacts#

skore provides a Project class to store data science artifacts. The storage is either local or remote, based on the value passed to the parameter mode at initialization. When mode is set to hub, the project is configured to communicate with skore hub. Refer to the documentation of Project for the detailed API and take a look on the example.

Creating a project#

All modes share the same constructor shape: pass name, mode, and any mode-specific keyword arguments.

from pathlib import Path
from skore import Project

# Local persistence
project_local = Project(name="my-xp", mode="local", workspace=Path("/tmp/skore"))

# Skore Hub (requires skore.login() first)
project_hub = Project(name="my-xp", mode="hub", workspace="my-workspace")

# MLflow experiment
project_mlflow = Project(
    name="my-experiment",
    mode="mlflow",
    tracking_uri="http://localhost:5000",
)

Working with reports#

Once a project is created, store EstimatorReport via the method Project.put().

To retrieve the reports stored in the project, use the project summary by calling the method Project.summarize(). This method returns a Summary object that holds the metadata and metrics of the stored reports and renders as an interactive table in Jupyter-like environments. Reports are listed in ascending order of their date.

The interactive view provides different views to sort, group by, and filter the reports; the selection produces a query string ready to pass to Summary.query(...). Once the reports are filtered, retrieve them by calling the compare method on the object returned by Project.summarize(). This method returns a list of EstimatorReport instances (or a ComparisonReport when called with return_as="report").

To retrieve a specific report for which you have its id (as returned by Project.summarize()), use the Project.get() method.