Skip to content

Commit

Permalink
Merge pull request optuna#5251 from HideakiImamura/ci/skip-gp-tests
Browse files Browse the repository at this point in the history
Skip `test_reproducible_in_other_process` for `GPSampler` with Python 3.12
  • Loading branch information
nabenabe0928 committed Feb 19, 2024
2 parents 323519d + 52d2405 commit 1bcda7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/samplers_tests/test_samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,10 @@ def restore_seed() -> None:
@pytest.mark.slow
@parametrize_sampler_name_with_seed
def test_reproducible_in_other_process(sampler_name: str, unset_seed_in_test: None) -> None:
# TODO(HideakiImamura): Remove the constraint after torch supports python 3.12.
if sys.version_info >= (3, 12, 0) and sampler_name == "GPSampler":
pytest.skip("PyTorch does not support Python 3.12 yet.")

# This test should be tested without `PYTHONHASHSEED`. However, some tool such as tox
# set the environmental variable "PYTHONHASHSEED" by default.
# To do so, this test calls a finalizer: `unset_seed_in_test`.
Expand Down

0 comments on commit 1bcda7a

Please sign in to comment.