2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
ax,
|
|
|
|
botorch,
|
|
|
|
ipywidgets,
|
|
|
|
jinja2,
|
|
|
|
pandas,
|
|
|
|
plotly,
|
|
|
|
python,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
typeguard,
|
|
|
|
wheel,
|
|
|
|
hypothesis,
|
|
|
|
mercurial,
|
|
|
|
pyfakefs,
|
|
|
|
pytestCheckHook,
|
|
|
|
yappi,
|
|
|
|
pyre-extensions,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ax";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.4.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = pname;
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-dj6Gig8N4oLtcZLwPl4QDHG/FwA2nFBtYxSARnWiJJU=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
botorch
|
|
|
|
ipywidgets
|
|
|
|
jinja2
|
|
|
|
pandas
|
|
|
|
plotly
|
|
|
|
typeguard
|
2024-01-13 08:15:51 +00:00
|
|
|
pyre-extensions
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
hypothesis
|
|
|
|
mercurial
|
|
|
|
pyfakefs
|
|
|
|
pytestCheckHook
|
|
|
|
yappi
|
|
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--ignore=ax/benchmark"
|
|
|
|
"--ignore=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"
|
|
|
|
# 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"
|
|
|
|
];
|
2023-08-22 20:05:09 +00:00
|
|
|
disabledTests = [
|
|
|
|
# exact comparison of floating points
|
|
|
|
"test_optimize_l0_homotopy"
|
2023-11-16 04:20:00 +00:00
|
|
|
# AssertionError: 5 != 2
|
|
|
|
"test_get_standard_plots_moo"
|
|
|
|
# AssertionError: Expected 'warning' to be called once. Called 3 times
|
|
|
|
"test_validate_kwarg_typing"
|
2024-05-15 15:35:15 +00:00
|
|
|
# uses torch.equal
|
|
|
|
"test_convert_observations"
|
2023-08-22 20:05:09 +00:00
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [ "ax" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# 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; };
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Ax is an accessible, general-purpose platform for understanding, managing, deploying, and automating adaptive experiments";
|
|
|
|
homepage = "https://ax.dev/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ veprbl ];
|
|
|
|
};
|
|
|
|
}
|