Project.get#
- Project.get(id)[source]
Get a persisted report by its id.
Report IDs can be found via
skore.Project.summarize(), which is also the preferred method of interacting with askore.Project.- Parameters:
- idstr
The id of a report already put in the
project.
- Returns:
- reportEstimatorReport or CrossValidationReport
The report associated with
id.
Examples
>>> from sklearn.datasets import make_regression >>> from sklearn.linear_model import LinearRegression >>> from pathlib import Path >>> from tempfile import TemporaryDirectory >>> from skore import Project, evaluate >>> X, y = make_regression(random_state=42) >>> report = evaluate(LinearRegression(), X, y, splitter=0.2) >>> tmpdir = TemporaryDirectory() >>> project = Project(mode="local", name="my-xp", workspace=Path(tmpdir.name)) >>> project.put("my-regression", report) >>> summary = project.summarize() >>> report_id = summary.index.get_level_values("id")[0] >>> retrieved = project.get(report_id) >>> type(retrieved).__name__ 'EstimatorReport' >>> tmpdir.cleanup()