about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ax
diff options
context:
space:
mode:
authorConnor Baker <connor.baker@tweag.io>2024-05-28 04:39:32 -0400
committerGitHub <noreply@github.com>2024-05-28 08:39:32 +0000
commitce45c8b72b089487f52463b4a3be9e5e84b697ac (patch)
tree3773691e06e6afc2a3d7f8d4001271d99832d921 /pkgs/development/python-modules/ax
parente803d375d3612f15121209650b8b09f5824341a7 (diff)
python312Packages.ax: disable tests on Python 3.12 (#314710)
The test suite has a number of failures (not limited to):

```
FAILED ax/analysis/helpers/tests/test_cross_validation_helpers.py::TestCrossValidationHelpers::test_get_min_max_with_errors - SystemError: <sys.legacy_event_handler object at 0x7ffc5029cdb0> returned a...
FAILED ax/analysis/helpers/tests/test_cross_validation_helpers.py::TestCrossValidationHelpers::test_obs_vs_pred_dropdown_plot - SystemError: <sys.legacy_event_handler object at 0x7ffc5029cdb0> returned a...
FAILED ax/analysis/helpers/tests/test_cross_validation_helpers.py::TestCrossValidationHelpers::test_store_df_to_file - SystemError: <sys.legacy_event_handler object at 0x7ffc5029cdb0> returned a...
FAILED ax/analysis/helpers/tests/test_cross_validation_helpers.py::TestCrossValidationHelpers::test_store_plot_as_dict - SystemError: <sys.legacy_event_handler object at 0x7ffc5029cdb0> returned a...
FAILED ax/analysis/helpers/tests/test_cv_consistency_checks.py::TestCVConsistencyCheck::test_error_scatter_data_branin - SystemError: <sys.legacy_event_handler object at 0x7ffc5029cdb0> returned a...
FAILED ax/analysis/helpers/tests/test_cv_consistency_checks.py::TestCVConsistencyCheck::test_error_scatter_trace_branin - SystemError: <sys.legacy_event_handler object at 0x7ffc5029cdb0> returned a...
```

Irritatingly enough, disabling those tests causes (or allows?) different tests to fail. After chasing these for some time, it proved easier to disable the test suite for Python 3.12.
Diffstat (limited to 'pkgs/development/python-modules/ax')
-rw-r--r--pkgs/development/python-modules/ax/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/ax/default.nix b/pkgs/development/python-modules/ax/default.nix
index ac6f96e48f2aa..dddcc6e1ebeb5 100644
--- a/pkgs/development/python-modules/ax/default.nix
+++ b/pkgs/development/python-modules/ax/default.nix
@@ -2,11 +2,13 @@
   lib,
   buildPythonPackage,
   fetchFromGitHub,
+  ax,
   botorch,
   ipywidgets,
   jinja2,
   pandas,
   plotly,
+  python,
   setuptools,
   setuptools-scm,
   typeguard,
@@ -79,6 +81,11 @@ buildPythonPackage rec {
   ];
   pythonImportsCheck = [ "ax" ];
 
+  # Many portions of the test suite fail under Python 3.12
+  doCheck = lib.versions.majorMinor python.version != "3.12";
+
+  passthru.tests.check = ax.overridePythonAttrs { doCheck = true; };
+
   meta = with lib; {
     description = "Ax is an accessible, general-purpose platform for understanding, managing, deploying, and automating adaptive experiments";
     homepage = "https://ax.dev/";