From fc9be56f372ec0fcde3a47f1c294e228d1480164 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 6 Sep 2026 10:22:19 +0000 Subject: [PATCH] python3Packages.torchrl: skip failing test --- pkgs/development/python-modules/torchrl/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/torchrl/default.nix b/pkgs/development/python-modules/torchrl/default.nix index 6648bb1ab916..ebfff655861e 100644 --- a/pkgs/development/python-modules/torchrl/default.nix +++ b/pkgs/development/python-modules/torchrl/default.nix @@ -198,6 +198,10 @@ buildPythonPackage (finalAttrs: { # Tests memory consumption grows significantly with the number of parallel processes # -> Limit the number of parallel jobs to prevent OOMing "--maxprocesses=16" + + # Some tests are flaky when ran with pytest-xdist. Give them 2 more chances to succeed. + "--reruns=3" + "--reruns-delay=1" ]; nativeCheckInputs = [ @@ -221,6 +225,8 @@ buildPythonPackage (finalAttrs: { # likely means that a valid OpenGL context has not been created before mjr_makeContext was # called "test_from_pixels_spec_and_rollout" + "test_render_every" + "test_vecenvs_env" # Hang forever "test_pixels_only_drops_observation_key" @@ -265,9 +271,6 @@ buildPythonPackage (finalAttrs: { "test_auto_register" "test_info_dict_reader" - # mujoco.FatalError: an OpenGL platform library has not been loaded into this process, this most likely means that a valid OpenGL context has not been created before mjr_makeContext was called - "test_vecenvs_env" - # ValueError: Can't write images with one color channel. "test_log_video" @@ -290,6 +293,9 @@ buildPythonPackage (finalAttrs: { "test_distributed_collector_updatepolicy" "test_timeit" + # AssertionError: assert tensor(7.6068e-06) > 1e-05 + "test_ddpg_prioritized_weights" + # On a 24 threads system # assert torch.get_num_threads() == max(1, init_threads - 3) # AssertionError: assert 23 == 21