From 9e9f811e8b2c90b81c6c33d97ca3cb208f2bbb80 Mon Sep 17 00:00:00 2001 From: Sylvain Combettes <48064216+sylvaincom@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:27:38 +0100 Subject: [PATCH] first push --- skore/src/skore/item/cross_validation_item.py | 21 ++++++++++++------- skore/src/skore/project/create.py | 2 +- skore/src/skore/project/project.py | 6 +++--- skore/src/skore/sklearn/cross_validate.py | 2 +- sphinx/api.rst | 4 ++++ sphinx/conf.py | 2 +- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/skore/src/skore/item/cross_validation_item.py b/skore/src/skore/item/cross_validation_item.py index 9dfb1650..d7a74cd0 100644 --- a/skore/src/skore/item/cross_validation_item.py +++ b/skore/src/skore/item/cross_validation_item.py @@ -252,8 +252,9 @@ class CrossValidationItem(Item): """ A class to represent the output of a cross-validation workflow. - This class encapsulates the output of scikit-learn's cross-validate function along - with its creation and update timestamps. + This class encapsulates the output of the + :func:`sklearn.model_selection.cross_validate` function along with its creation and + update timestamps. """ def __init__( @@ -272,14 +273,16 @@ def __init__( Parameters ---------- cv_results_serialized : dict - The dict output of scikit-learn's cross_validate function, - in a form suitable for serialization. + The dict output of the :func:`sklearn.model_selection.cross_validate` + function, in a form suitable for serialization. estimator_info : dict The estimator that was cross-validated. X_info : dict - A summary of the data, input of scikit-learn's cross_validation function. + A summary of the data, input of the + :func:`sklearn.model_selection.cross_validate` function. y_info : dict - A summary of the target, input of scikit-learn's cross_validation function. + A summary of the target, input of the + :func:`sklearn.model_selection.cross_validate` function. plot_bytes : bytes A plot of the cross-validation results, in the form of bytes. created_at : str @@ -313,9 +316,11 @@ def factory( estimator : sklearn.base.BaseEstimator, The estimator that was cross-validated. X - The data, input of scikit-learn's cross_validation function. + The data, input of the :func:`sklearn.model_selection.cross_validate` + function. y - The target, input of scikit-learn's cross_validation function. + The target, input of the :func:`sklearn.model_selection.cross_validate` + function. Returns ------- diff --git a/skore/src/skore/project/create.py b/skore/src/skore/project/create.py index 4f387015..38fefa02 100644 --- a/skore/src/skore/project/create.py +++ b/skore/src/skore/project/create.py @@ -70,7 +70,7 @@ def create( Name of the project to be created, or a relative or absolute path. working_dir : Path or None If ``project_name`` is not an absolute path, it will be considered relative to - ``working_dir``. If `project_name` is an absolute path, ``working_dir`` will + ``working_dir``. If ``project_name`` is an absolute path, ``working_dir`` will have no effect. If set to ``None`` (the default), ``working_dir`` will be re-set to the current working directory. overwrite : bool diff --git a/skore/src/skore/project/project.py b/skore/src/skore/project/project.py index fb33ddd1..c3a48bab 100644 --- a/skore/src/skore/project/project.py +++ b/skore/src/skore/project/project.py @@ -166,7 +166,7 @@ def get_item(self, key: str) -> Item: Returns ------- item : Item - The Item corresponding to key ``key``. + The Item corresponding to ``key``. Raises ------ @@ -179,7 +179,7 @@ def get_item_versions(self, key: str) -> list[Item]: """ Get all the versions of an item associated with ``key`` from the Project. - The list is ordered from oldest to newest "put" date. + The list is ordered from oldest to newest :func:`~skore.Project.put` date. Parameters ---------- @@ -189,7 +189,7 @@ def get_item_versions(self, key: str) -> list[Item]: Returns ------- list[Item] - The list of items corresponding to key ``key``. + The list of items corresponding to ``key``. Raises ------ diff --git a/skore/src/skore/sklearn/cross_validate.py b/skore/src/skore/sklearn/cross_validate.py index fc4e9687..fe409377 100644 --- a/skore/src/skore/sklearn/cross_validate.py +++ b/skore/src/skore/sklearn/cross_validate.py @@ -17,7 +17,7 @@ def _get_scorers_to_add(estimator, y) -> list[str]: - """Get a list of scorers based on `estimator` and `y`. + """Get a list of scorers based on ``estimator`` and ``y``. Parameters ---------- diff --git a/sphinx/api.rst b/sphinx/api.rst index 738d3ffe..1b384bf0 100644 --- a/sphinx/api.rst +++ b/sphinx/api.rst @@ -5,6 +5,10 @@ API This page lists all the public functions and classes of the skore package. +.. warning :: + + This code is still in development. **The API is subject to change.** + Project ------- diff --git a/sphinx/conf.py b/sphinx/conf.py index b557a4c7..cac73427 100644 --- a/sphinx/conf.py +++ b/sphinx/conf.py @@ -105,7 +105,7 @@ "icon": "fa-brands fa-discord", }, ], - "announcement": "This code is still in development. The API is subject to change.", + # "announcement": "This code is still in development. The API is subject to change.", } # Plausible Analytics