diff --git a/.github/workflows/windows-tests.yml b/.github/workflows/windows-tests.yml index 599b7bb08eb..f5a450c86ad 100644 --- a/.github/workflows/windows-tests.yml +++ b/.github/workflows/windows-tests.yml @@ -118,6 +118,8 @@ jobs: pip install --progress-bar off .[optional] pip install --progress-bar off .[integration] pip install "distributed<2023.3.2" + # TODO(nabenabe0928): Remove the version constraint on Torch. + pip install "torch<2.2.0" - name: Output installed packages run: | diff --git a/optuna/integration/pytorch_distributed.py b/optuna/integration/pytorch_distributed.py index 51e56cd8eb9..c30c4116f07 100644 --- a/optuna/integration/pytorch_distributed.py +++ b/optuna/integration/pytorch_distributed.py @@ -21,7 +21,7 @@ with try_import() as _imports: import torch import torch.distributed as dist - from torch.distributed import ProcessGroup # type: ignore[attr-defined] + from torch.distributed import ProcessGroup if TYPE_CHECKING: diff --git a/tests/artifacts_tests/test_boto3.py b/tests/artifacts_tests/test_boto3.py index d703945fe11..fef599cf7f7 100644 --- a/tests/artifacts_tests/test_boto3.py +++ b/tests/artifacts_tests/test_boto3.py @@ -11,10 +11,10 @@ try: - from moto import mock_aws + # TODO(nabenabe0928): Replace it with `from moto import mock_aws` after dropping Python3.7. + from moto import mock_aws # type: ignore[attr-defined] except ImportError: - from moto import mock_s3 as mock_aws - + from moto import mock_s3 as mock_aws # type: ignore[attr-defined,no-redef] if TYPE_CHECKING: from collections.abc import Iterator