diff --git a/docs/errors.rst b/docs/errors.rst index f1b6356a..dd78d767 100644 --- a/docs/errors.rst +++ b/docs/errors.rst @@ -37,3 +37,46 @@ Please use `study.set_metric_names() `_ function instead. + +.. list-table:: + + * - Deprecated APIs + - Corresponding Active APIs + * - ``optuna_dashboard.artifact.upload_artifact(artifact_backend, trial, fiel_path)`` + - ``optuna.artifacts.upload_artifact(trial, file_path, artifact_store)`` + +Please note that the order of arguments is different between the deprecated and active APIs. + + +``FileSystemBackend`` is deprecated. Please use ``FileSystemArtifactStore`` instead. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:class:`~optuna_dashboard.artifact.file_system.FileSystemBackend` class has been ported to Optuna. +Please use `FileSystemArtifactStore `_ class instead. + +.. list-table:: + + * - Deprecated APIs + - Corresponding Active APIs + * - ``optuna_dashboard.artifact.file_system.FileSystemBackend(base_path)`` + - ``optuna.artifacts.FileSystemArtifactStore(base_path)`` + + +``Boto3Backend``` is deprecated. Please use ``Boto3ArtifactStore`` instead. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:class:`~optuna_dashboard.artifact.boto3.Boto3Backend` class has been ported to Optuna. +Please use `Boto3ArtifactStore `_ class instead. + +.. list-table:: + + * - Deprecated APIs + - Corresponding Active APIs + * - ``optuna_dashboard.artifact.boto3.Boto3Backend(bucket_name, client=None)`` + - ``optuna.artifacts.Boto3ArtifactStore(bucket_name, client=None)`` diff --git a/optuna_dashboard/artifact/_backend.py b/optuna_dashboard/artifact/_backend.py index f5c39caa..eea1e988 100644 --- a/optuna_dashboard/artifact/_backend.py +++ b/optuna_dashboard/artifact/_backend.py @@ -161,9 +161,8 @@ def upload_artifact( return ... """ warnings.warn( - "This function is deprecated. Please use optuna.artifacts.upload_artifact() instead.\n" - "See https://optuna.readthedocs.io/en/latest/reference/generated/" - "optuna.artifacts.upload_artifact.html", + "upload_artifact() is deprecated. Please use optuna.artifacts.upload_artifact() instead.\n" + "See https://optuna-dashboard.readthedocs.io/en/latest/errors.html for details", DeprecationWarning, ) diff --git a/optuna_dashboard/artifact/boto3.py b/optuna_dashboard/artifact/boto3.py index a4656c7a..46edf165 100644 --- a/optuna_dashboard/artifact/boto3.py +++ b/optuna_dashboard/artifact/boto3.py @@ -52,9 +52,8 @@ class Boto3Backend: # See https://github.com/boto/boto3/issues/929 self._avoid_buf_copy = avoid_buf_copy warnings.warn( - "Boto3Backend is deprecated. Please use optuna.artifacts.Boto3ArtifactStore instead.\n" - "See https://optuna.readthedocs.io/en/latest/reference/generated/optuna.artifacts." - "Boto3ArtifactStore.html", + "Boto3Backend is deprecated. Please use Boto3ArtifactStore instead.\n" + "See https://optuna-dashboard.readthedocs.io/en/latest/errors.html for details", DeprecationWarning, ) diff --git a/optuna_dashboard/artifact/file_system.py b/optuna_dashboard/artifact/file_system.py index d298e9d6..ca85a7a9 100644 --- a/optuna_dashboard/artifact/file_system.py +++ b/optuna_dashboard/artifact/file_system.py @@ -41,8 +41,7 @@ class FileSystemBackend: self._base_path = base_path warnings.warn( "FileSystemBackend is deprecated. Please use FileSystemArtifactStore instead.\n" - "See https://optuna.readthedocs.io/en/latest/reference/generated/optuna.artifacts." - "FileSystemArtifactStore.html", + "See https://optuna-dashboard.readthedocs.io/en/latest/errors.html for details", DeprecationWarning, )