diff --git a/optuna/artifacts/_backoff.py b/optuna/artifacts/_backoff.py index f8b6ce5f70..823a9c62b2 100644 --- a/optuna/artifacts/_backoff.py +++ b/optuna/artifacts/_backoff.py @@ -13,7 +13,7 @@ if TYPE_CHECKING: from typing import BinaryIO - from ._protocol import ArtifactStore + from optuna.artifacts._protocol import ArtifactStore class Backoff: @@ -112,6 +112,6 @@ def remove(self, artifact_id: str) -> None: if TYPE_CHECKING: # A mypy-runtime assertion to ensure that the Backoff middleware implements # all abstract methods in ArtifactStore. - from . import FileSystemArtifactStore + from optuna.artifacts import FileSystemArtifactStore _: ArtifactStore = Backoff(FileSystemArtifactStore(".")) diff --git a/optuna/artifacts/_boto3.py b/optuna/artifacts/_boto3.py index 62366131a4..ed9cd7f4ee 100644 --- a/optuna/artifacts/_boto3.py +++ b/optuna/artifacts/_boto3.py @@ -101,6 +101,6 @@ def _is_not_found_error(e: ClientError) -> bool: if TYPE_CHECKING: # A mypy-runtime assertion to ensure that Boto3ArtifactStore implements all abstract methods # in ArtifactStore. - from ._protocol import ArtifactStore + from optuna.artifacts._protocol import ArtifactStore _: ArtifactStore = Boto3ArtifactStore("") diff --git a/optuna/artifacts/_filesystem.py b/optuna/artifacts/_filesystem.py index dcdfcbb740..32318996bd 100644 --- a/optuna/artifacts/_filesystem.py +++ b/optuna/artifacts/_filesystem.py @@ -75,6 +75,6 @@ def remove(self, artifact_id: str) -> None: if TYPE_CHECKING: # A mypy-runtime assertion to ensure that LocalArtifactBackend # implements all abstract methods in ArtifactBackendProtocol. - from ._protocol import ArtifactStore + from optuna.artifacts._protocol import ArtifactStore _: ArtifactStore = FileSystemArtifactStore("") diff --git a/optuna/artifacts/_gcs.py b/optuna/artifacts/_gcs.py index ec3826d623..65aa97a951 100644 --- a/optuna/artifacts/_gcs.py +++ b/optuna/artifacts/_gcs.py @@ -89,6 +89,6 @@ def remove(self, artifact_id: str) -> None: if TYPE_CHECKING: # A mypy-runtime assertion to ensure that GCS3ArtifactStore implements all abstract methods # in ArtifactStore. - from ._protocol import ArtifactStore + from optuna.artifacts._protocol import ArtifactStore _: ArtifactStore = GCSArtifactStore("") diff --git a/optuna/samplers/_gp/__init__.py b/optuna/samplers/_gp/__init__.py index 9f55ab1f62..ff09f1235a 100644 --- a/optuna/samplers/_gp/__init__.py +++ b/optuna/samplers/_gp/__init__.py @@ -1,4 +1,4 @@ -from .sampler import GPSampler +from optuna.samplers._gp.sampler import GPSampler __all__ = ["GPSampler"]