Skip to content

Commit

Permalink
python312Packages.ax-platform: add optional-dependencies
Browse files Browse the repository at this point in the history
- switch to disabledTestPaths
  • Loading branch information
fabaff committed Nov 1, 2024
1 parent f25120e commit 28cccc9
Showing 1 changed file with 35 additions and 21 deletions.
56 changes: 35 additions & 21 deletions pkgs/development/python-modules/ax-platform/default.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
{
lib,
botorch,
buildPythonPackage,
fetchFromGitHub,
botorch,
hypothesis,
ipywidgets,
jinja2,
jupyter,
mercurial,
pandas,
plotly,
setuptools,
setuptools-scm,
typeguard,
hypothesis,
mercurial,
pyfakefs,
pyre-extensions,
pytestCheckHook,
pythonOlder,
setuptools-scm,
setuptools,
sqlalchemy,
typeguard,
yappi,
pyre-extensions,
}:

buildPythonPackage rec {
pname = "ax-platform";
version = "0.4.3";
pyproject = true;

disabled = pythonOlder "3.10";

src = fetchFromGitHub {
owner = "facebook";
repo = "ax";
rev = "refs/tags/${version}";
hash = "sha256-jmBjrtxqg4Iu3Qr0HRqjVfwURXzbJaGm+DBFNHYk/vA=";
};

env.ALLOW_BOTORCH_LATEST = "1";

build-system = [
setuptools
setuptools-scm
Expand All @@ -45,28 +52,34 @@ buildPythonPackage rec {
pyre-extensions
];

env.ALLOW_BOTORCH_LATEST = "1";
optional-dependencies = {
mysql = [ sqlalchemy ];
notebook = [ jupyter ];
};

nativeCheckInputs = [
hypothesis
mercurial
pyfakefs
pytestCheckHook
yappi
];
pytestFlagsArray = [
"--ignore=ax/benchmark"
"--ignore=ax/runners/tests/test_torchx.py"
] ++ lib.flatten (builtins.attrValues optional-dependencies);

disabledTestPaths = [
"ax/benchmark"
"ax/runners/tests/test_torchx.py"
# requires pyre_extensions
"--ignore=ax/telemetry/tests"
"--ignore=ax/core/tests/test_utils.py"
"--ignore=ax/early_stopping/tests/test_strategies.py"
"ax/telemetry/tests"
"ax/core/tests/test_utils.py"
"ax/early_stopping/tests/test_strategies.py"
# broken with sqlalchemy 2
"--ignore=ax/service/tests/test_ax_client.py"
"--ignore=ax/service/tests/test_scheduler.py"
"--ignore=ax/service/tests/test_with_db_settings_base.py"
"--ignore=ax/storage"
"ax/core/tests/test_experiment.py"
"ax/service/tests/test_ax_client.py"
"ax/service/tests/test_scheduler.py"
"ax/service/tests/test_with_db_settings_base.py"
"ax/storage"
];

disabledTests = [
# exact comparison of floating points
"test_optimize_l0_homotopy"
Expand All @@ -77,12 +90,13 @@ buildPythonPackage rec {
# uses torch.equal
"test_convert_observations"
];

pythonImportsCheck = [ "ax" ];

meta = with lib; {
changelog = "https://github.com/facebook/Ax/releases/tag/${version}";
description = "Ax is an accessible, general-purpose platform for understanding, managing, deploying, and automating adaptive experiments";
description = "Platform for understanding, managing, deploying, and automating adaptive experiments";
homepage = "https://ax.dev/";
changelog = "https://github.com/facebook/Ax/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ veprbl ];
};
Expand Down

0 comments on commit 28cccc9

Please sign in to comment.