lol

python3Packages.skorch: disable broken tests (#405978)

authored by

Aleksana and committed by
GitHub
26eeab7c f5e23fb3

+36 -30
+36 -30
pkgs/development/python-modules/skorch/default.nix
··· 2 2 lib, 3 3 stdenv, 4 4 buildPythonPackage, 5 - fetchPypi, 5 + fetchFromGitHub, 6 6 pythonOlder, 7 7 numpy, 8 8 scikit-learn, ··· 17 17 pytest-cov-stub, 18 18 pytestCheckHook, 19 19 safetensors, 20 + transformers, 20 21 pythonAtLeast, 21 22 }: 22 23 ··· 25 26 version = "1.1.0"; 26 27 pyproject = true; 27 28 28 - src = fetchPypi { 29 - inherit pname version; 30 - hash = "sha256-AguMhI/MO4DNexe5azVEXOw7laTRBN0ecFW81qqh0rY="; 29 + src = fetchFromGitHub { 30 + owner = "skorch-dev"; 31 + repo = "skorch"; 32 + tag = "v${version}"; 33 + sha256 = "sha256-f0g/kn3HhvYfGDgLpA7gAnYocJrYqHUq680KrGuoPCQ="; 31 34 }; 32 35 33 36 # AttributeError: 'NoneType' object has no attribute 'span' with Python 3.13 ··· 38 41 39 42 dependencies = [ 40 43 numpy 44 + pandas 41 45 scikit-learn 42 46 scipy 43 47 tabulate ··· 47 51 48 52 nativeCheckInputs = [ 49 53 flaky 50 - pandas 51 54 pytest-cov-stub 52 55 pytestCheckHook 53 56 safetensors 57 + transformers 54 58 ]; 55 59 56 60 checkInputs = lib.optionals stdenv.cc.isClang [ llvmPackages.openmp ]; 57 61 58 - disabledTests = 59 - [ 60 - # on CPU, these expect artifacts from previous GPU run 61 - "test_load_cuda_params_to_cpu" 62 - # failing tests 63 - "test_pickle_load" 64 - ] 65 - ++ lib.optionals stdenv.hostPlatform.isDarwin [ 66 - # there is a problem with the compiler selection 67 - "test_fit_and_predict_with_compile" 68 - ]; 62 + disabledTests = [ 63 + # on CPU, these expect artifacts from previous GPU run 64 + "test_load_cuda_params_to_cpu" 65 + # failing tests 66 + "test_pickle_load" 67 + # there is a problem with the compiler selection 68 + "test_fit_and_predict_with_compile" 69 + # "Weights only load failed" 70 + "test_can_be_copied" 71 + "test_pickle" 72 + "test_pickle_save_load" 73 + "test_train_net_after_copy" 74 + "test_weights_restore" 75 + # Reported as flaky 76 + "test_fit_lbfgs_optimizer" 77 + ]; 69 78 70 - disabledTestPaths = 71 - [ 72 - # tries to import `transformers` and download HuggingFace data 73 - "skorch/tests/test_hf.py" 74 - ] 75 - ++ lib.optionals 76 - (stdenv.hostPlatform.system != "x86_64-linux" && stdenv.hostPlatform.system != "aarch64-darwin") 77 - [ 78 - # these tests fail when running in parallel for multiple platforms with: 79 - # "RuntimeError: The server socket has failed to listen on any local 80 - # network address because they use the same hardcoded port." For now, 81 - # running for one platform per OS to avoid spurious failures. 82 - "skorch/tests/test_history.py" 83 - ]; 79 + disabledTestPaths = [ 80 + # tries to download missing HuggingFace data 81 + "skorch/tests/test_dataset.py" 82 + "skorch/tests/test_hf.py" 83 + "skorch/tests/llm/test_llm_classifier.py" 84 + # These tests fail when running in parallel for all platforms with: 85 + # "RuntimeError: The server socket has failed to listen on any local 86 + # network address because they use the same hardcoded port." 87 + # This happens on every platform with sandboxing enabled. 88 + "skorch/tests/test_history.py" 89 + ]; 84 90 85 91 pythonImportsCheck = [ "skorch" ]; 86 92