From 6e2d82abb47768f8c8ad92113344d3695ee8a9cf Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 3 Dec 2025 13:55:34 -0800 Subject: [PATCH] python3Packages.mmengine: disable Darwin tests that fail under nixpkgs-review These tests are fine under nix-build but fail under review due to port conflicts and torch access conflicts. --- .../python-modules/mmengine/default.nix | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/mmengine/default.nix b/pkgs/development/python-modules/mmengine/default.nix index 5a0a50a8bc20..aa4907f3482d 100644 --- a/pkgs/development/python-modules/mmengine/default.nix +++ b/pkgs/development/python-modules/mmengine/default.nix @@ -128,6 +128,33 @@ buildPythonPackage rec { # ValueError: User specified autocast device_type must be cuda or cpu, but got mps "tests/test_runner/test_runner.py::TestRunner::test_test" "tests/test_runner/test_runner.py::TestRunner::test_val" + + # Fails in pytestCheckHook due to multiple copies accessing the same resources (nixpkgs-review + "tests/test_hooks/test_ema_hook.py::TestEMAHook::test_after_test_epoch" + "tests/test_hooks/test_ema_hook.py::TestEMAHook::test_after_val_epoch" + "tests/test_hooks/test_ema_hook.py::TestEMAHook::test_before_test_epoch" + "tests/test_hooks/test_ema_hook.py::TestEMAHook::test_before_val_epoch" + "tests/test_infer/test_infer.py" + "tests/test_runner/test_runner.py::TestRunner::test_checkpoint" + + # torch.distributed.DistNetworkError: [...] message: address already in use + # Happens in nixpkgs-review due to the lack of network namespacing + # Note: These all worked fine in nix-build + "tests/test_dist/test_dist.py" + "tests/test_dist/test_utils.py" # fails in _init_dist_env + "tests/test_hooks/test_sync_buffers_hook.py::TestSyncBuffersHook::test_sync_buffers_hook" + "tests/test_model/test_model_utils.py::test_is_model_wrapper" + "tests/test_model/test_wrappers/test_model_wrapper.py::TestDistributedDataParallel" + "tests/test_optim/test_optimizer/test_optimizer.py::TestZeroOptimizer::test_zero_redundancy_optimizer" + "tests/test_runner/test_runner.py::TestRunner::test_custom_loop" + "tests/test_runner/test_runner.py::TestRunner::test_default_scope" + "tests/test_runner/test_runner.py::TestRunner::test_init" + "tests/test_runner/test_runner.py::TestRunner::test_train" + "tests/test_optim/test_optimizer/test_optimizer_wrapper.py::TestOptimWrapper::test_optim_context" + "tests/test_testing/test_runner_test_case.py" + + # TypeError: 'BaseDataset' object is not callable + "tests/test_dataset/test_base_dataset.py::TestBaseDataset::test_get_subset[False-True]" ]; disabledTests = [ @@ -149,10 +176,10 @@ buildPythonPackage rec { # Fails when max-jobs is set to use fewer processes than cores # for example `AssertionError: assert 14 == 4` "test_setup_multi_processes" - ]; - # torch.distributed.DistNetworkError: The server socket has failed to bind. - __darwinAllowLocalNetworking = true; + # Crashes in pytestCheckHook due to MPS incompatibility in torch + "test_with_runner" + ]; meta = { description = "Library for training deep learning models based on PyTorch";