From 52d24057c0233961d04df13ac3cae1c1cba32369 Mon Sep 17 00:00:00 2001 From: HideakiImamura Date: Thu, 15 Feb 2024 09:29:42 +0900 Subject: [PATCH] Skip `test_reproducible_in_other_process` for GPSampler with Python 3.12 --- tests/samplers_tests/test_samplers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/samplers_tests/test_samplers.py b/tests/samplers_tests/test_samplers.py index 420eb63d96..4ab9a9f5d6 100644 --- a/tests/samplers_tests/test_samplers.py +++ b/tests/samplers_tests/test_samplers.py @@ -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`.