Skip to content

Commit

Permalink
Merge pull request optuna#5569 from RektPunk/remove-relative-import
Browse files Browse the repository at this point in the history
Replace relative import to absolute path
  • Loading branch information
eukaryo authored Jul 14, 2024
2 parents 9b5c863 + ec36e9e commit 6ace27f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions optuna/artifacts/_backoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
if TYPE_CHECKING:
from typing import BinaryIO

from ._protocol import ArtifactStore
from optuna.artifacts._protocol import ArtifactStore


class Backoff:
Expand Down Expand Up @@ -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("."))
2 changes: 1 addition & 1 deletion optuna/artifacts/_boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
2 changes: 1 addition & 1 deletion optuna/artifacts/_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
2 changes: 1 addition & 1 deletion optuna/artifacts/_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
2 changes: 1 addition & 1 deletion optuna/samplers/_gp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .sampler import GPSampler
from optuna.samplers._gp.sampler import GPSampler


__all__ = ["GPSampler"]

0 comments on commit 6ace27f

Please sign in to comment.