File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 15
15
import torch
16
16
17
17
from _utils_internal import capture_log_records , get_default_devices
18
+ from packaging import version
18
19
from torchrl ._utils import _rng_decorator , get_binary_env_var , implement_for
19
20
20
21
from torchrl .envs .libs .gym import gym_backend , GymWrapper , set_gym_backend
21
22
23
+ TORCH_VERSION = version .parse (version .parse (torch .__version__ ).base_version )
24
+
22
25
23
26
@pytest .mark .parametrize ("value" , ["True" , "1" , "true" ])
24
27
def test_get_binary_env_var_positive (value ):
@@ -382,6 +385,9 @@ def test_rng_decorator(device):
382
385
383
386
# Check that 'capture_log_records' captures records emitted when torch
384
387
# recompiles a function.
388
+ @pytest .mark .skipif (
389
+ TORCH_VERSION < version .parse ("2.5.0" ), reason = "requires Torch >= 2.5.0"
390
+ )
385
391
def test_capture_log_records_recompile ():
386
392
torch .compiler .reset ()
387
393
You can’t perform that action at this time.
0 commit comments