From b28f7c5303a1ccb8a0d73b91df415b6d86c8eb9d Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Sat, 25 May 2024 01:40:05 +0000 Subject: python3Packages.apricot-select: move scikit-learn and torchvision to dependencies These are needed when building the package, not just during the checkPhase. This can be observed by setting doCheck to false. --- pkgs/development/python-modules/apricot-select/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/apricot-select/default.nix b/pkgs/development/python-modules/apricot-select/default.nix index b50707e96e6fa..20d47913d19bf 100644 --- a/pkgs/development/python-modules/apricot-select/default.nix +++ b/pkgs/development/python-modules/apricot-select/default.nix @@ -37,15 +37,15 @@ buildPythonPackage rec { dependencies = [ numba numpy + scikit-learn scipy + torchvision tqdm ]; nativeCheckInputs = [ pynose pytestCheckHook - scikit-learn - torchvision ]; pythonImportsCheck = [ "apricot" ]; -- cgit 1.4.1 From b1c46e1d2e20ba001be75dd197ad3adbe19b89d2 Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Sat, 25 May 2024 01:40:55 +0000 Subject: python3Packages.apricot-select: disable flaky tests --- pkgs/development/python-modules/apricot-select/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/apricot-select/default.nix b/pkgs/development/python-modules/apricot-select/default.nix index 20d47913d19bf..4b735ec1c98e4 100644 --- a/pkgs/development/python-modules/apricot-select/default.nix +++ b/pkgs/development/python-modules/apricot-select/default.nix @@ -56,6 +56,16 @@ buildPythonPackage rec { "tests/test_optimizers/test_knapsack_feature_based.py" ]; + # NOTE: These tests seem to be flaky. + disabledTests = [ + "test_digits_modular" + "test_digits_modular_object" + "test_digits_modular_sparse" + "test_digits_sqrt_modular" + "test_digits_sqrt_modular_object" + "test_digits_sqrt_modular_sparse" + ]; + meta = with lib; { description = "Module for submodular optimization for the purpose of selecting subsets of massive data sets"; homepage = "https://github.com/jmschrei/apricot"; -- cgit 1.4.1 From 7568ee06c9f8db787588c2168895301a5db4cded Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Sun, 26 May 2024 14:50:31 -0400 Subject: python3Packages.apricot-select: disable tests by default They can run for hours on Hydra: https://hydra.nixos.org/build/261011861 --- pkgs/development/python-modules/apricot-select/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/apricot-select/default.nix b/pkgs/development/python-modules/apricot-select/default.nix index 4b735ec1c98e4..f05e9b8e5e95f 100644 --- a/pkgs/development/python-modules/apricot-select/default.nix +++ b/pkgs/development/python-modules/apricot-select/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + apricot-select, numba, numpy, pynose, @@ -66,6 +67,11 @@ buildPythonPackage rec { "test_digits_sqrt_modular_sparse" ]; + # NOTE: Tests are disabled by default because they can run for hours and timeout on Hydra. + doCheck = false; + + passthru.tests.check = apricot-select.overridePythonAttrs { doCheck = true; }; + meta = with lib; { description = "Module for submodular optimization for the purpose of selecting subsets of massive data sets"; homepage = "https://github.com/jmschrei/apricot"; -- cgit 1.4.1