Skip to content

Conversation

@thomass-dev
Copy link
Collaborator

@thomass-dev thomass-dev commented Feb 10, 2026

Closes #2330.

@thomass-dev thomass-dev changed the title feat(skore/project)!: Enforce mode in a dedicated parameter feat(skore/project)!: Enforce mode in a dedicated parameter Feb 10, 2026
@thomass-dev thomass-dev force-pushed the skore-hub-project-project-name branch from 7f589a2 to 133baf1 Compare February 10, 2026 12:32
@thomass-dev thomass-dev marked this pull request as ready for review February 10, 2026 12:33
@thomass-dev thomass-dev force-pushed the skore-hub-project-project-name branch from 133baf1 to 2bf8763 Compare February 10, 2026 12:34
@github-actions
Copy link
Contributor

Documentation preview @ 2bf8763

@github-actions
Copy link
Contributor

Coverage

Coverage Report for skore/
FileStmtsMissCoverMissing
skore/src/skore
   __init__.py260100% 
   _config.py310100% 
   _login.py140100% 
   exceptions.py440%4, 15, 19, 23
skore/src/skore/_sklearn
   __init__.py60100% 
   _base.py73889%272–279
   feature_names.py260100% 
   find_ml_task.py610100% 
   types.py28196%30
skore/src/skore/_sklearn/_comparison
   __init__.py70100% 
   inspection_accessor.py27196%124
   metrics_accessor.py166298%179, 1138
   report.py111397%488, 491, 497
   utils.py570100% 
skore/src/skore/_sklearn/_cross_validation
   __init__.py90100% 
   data_accessor.py400100% 
   inspection_accessor.py20195%116
   metrics_accessor.py169597%1054, 1115, 1118, 1144–1145
   report.py125496%492, 502, 505, 511
skore/src/skore/_sklearn/_estimator
   __init__.py90100% 
   data_accessor.py61296%84, 188
   inspection_accessor.py70297%315, 329
   metrics_accessor.py367698%427, 431, 446, 476, 1661, 1744
   report.py158497%443–444, 463, 466
skore/src/skore/_sklearn/_plot
   __init__.py30100% 
   base.py57296%59–60
   utils.py121298%273–274
skore/src/skore/_sklearn/_plot/data
   __init__.py20100% 
   table_report.py175199%657
skore/src/skore/_sklearn/_plot/inspection
   __init__.py00100% 
   coefficients.py2040100% 
   impurity_decrease.py61198%185
   permutation_importance.py1490100% 
   utils.py90100% 
skore/src/skore/_sklearn/_plot/metrics
   __init__.py60100% 
   confusion_matrix.py1560100% 
   metrics_summary_display.py80100% 
   precision_recall_curve.py1080100% 
   prediction_error.py1510100% 
   roc_curve.py1120100% 
skore/src/skore/_sklearn/train_test_split
   __init__.py00100% 
   train_test_split.py580100% 
skore/src/skore/_sklearn/train_test_split/warning
   __init__.py80100% 
   high_class_imbalance_too_few_examples_warning.py19194%83
   high_class_imbalance_warning.py200100% 
   random_state_unset_warning.py100100% 
   shuffle_true_warning.py90100% 
   stratify_is_set_warning.py100100% 
   time_based_column_warning.py210100% 
   train_test_split_warning.py30100% 
skore/src/skore/_utils
   __init__.py6266%8, 13
   _accessor.py112397%38, 214, 268
   _cache.py370100% 
   _environment.py32293%41, 44
   _fixes.py80100% 
   _index.py50100% 
   _logger.py22481%15–17, 19
   _measure_time.py100100% 
   _parallel.py38392%23, 33, 124
   _patch.py211242%30, 35–39, 42–43, 46–47, 58, 60
   _progress_bar.py42392%67–68, 80
   _show_versions.py380100% 
   _testing.py1031189%20, 29, 157, 166, 177–182, 184
skore/src/skore/_utils/repr
   __init__.py20100% 
   base.py540100% 
   data.py1630100% 
   html_repr.py380100% 
   rich_repr.py810100% 
skore/src/skore/project
   __init__.py20100% 
   _summary.py75198%119
   _widget.py1870100% 
   project.py60395%150, 191, 312
TOTAL42819497% 

Tests Skipped Failures Errors Time
1641 5 💤 0 ❌ 0 🔥 6m 24s ⏱️

If the ``name`` takes the form of the URI ``hub://<workspace>/<name>``, the project
is configured to the ``hub`` mode to communicate with the ``skore hub``.
The project is configured to the ``hub`` mode to communicate with the ``skore hub``.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The project is configured to the ``hub`` mode to communicate with the ``skore hub``.

interface. It represents an isolated entity managing users, projects, and
resources. It can be a company, organization, or team that operates
independently within the system.
In this mode, the ``name`` takes the form ``<workspace>/<name>``, where the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this mode, the ``name`` takes the form ``<workspace>/<name>``, where the
In this mode, the ``name`` is expected to be of the form ``<workspace>/<name>``, where the

resources. It can be a company, organization, or team that operates
independently within the system.
In this mode, the ``name`` takes the form ``<workspace>/<name>``, where the
workspace is a ``skore hub`` concept that must be configured on the ``skore hub``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we link to skore hub here?

Comment on lines +41 to 43
Also in this mode, you must have an account to the ``skore hub`` and must be
authorized to the specified workspace. You must also be authenticated beforehand,
by calling the ``skore.login()`` function at the top of your script.
Copy link
Collaborator

@auguste-probabl auguste-probabl Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Also in this mode, you must have an account to the ``skore hub`` and must be
authorized to the specified workspace. You must also be authenticated beforehand,
by calling the ``skore.login()`` function at the top of your script.
Note: Using Project in `hub` mode requires an account on `skore hub`,
with access rights to the specified workspace. Authentication to skore-hub
is done by running `skore.login()` before instantiating the Project.

- otherwise, the project is configured to communicate with a local storage,
on the user machine.
The name of the project.
mode : {"hub", "local"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have "local" as the default?


@staticmethod
def delete(name: str, **kwargs):
def delete(name: str, *, mode: Mode, **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Hm, this is making me not like that delete is a static method



def login(*, mode: Literal["local", "hub"] = "hub", **kwargs):
def login(*, mode: Literal["hub", "local"] = "hub", **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reuse the Mode type



def login(*, mode: Literal["local", "hub"] = "hub", **kwargs):
def login(*, mode: Literal["hub", "local"] = "hub", **kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this function take a mode argument? It doesn't make sense to pass local to it right?

plugins = entry_points(group="skore.plugins.login")

if mode not in plugins.names:
raise ValueError(f"Unknown mode `{mode}`. Please install `skore[{mode}]`.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this error could be factorized with the one in project.py

@thomass-dev thomass-dev self-assigned this Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hub:// prefix should not be the discriminent for remote project anymore

2 participants