Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 ax, 6 botorch, 7 ipywidgets, 8 jinja2, 9 pandas, 10 plotly, 11 python, 12 setuptools, 13 setuptools-scm, 14 typeguard, 15 wheel, 16 hypothesis, 17 mercurial, 18 pyfakefs, 19 pytestCheckHook, 20 yappi, 21 pyre-extensions, 22}: 23 24buildPythonPackage rec { 25 pname = "ax"; 26 version = "0.4.0"; 27 format = "pyproject"; 28 29 src = fetchFromGitHub { 30 owner = "facebook"; 31 repo = pname; 32 rev = "refs/tags/${version}"; 33 hash = "sha256-dj6Gig8N4oLtcZLwPl4QDHG/FwA2nFBtYxSARnWiJJU="; 34 }; 35 36 nativeBuildInputs = [ 37 setuptools 38 setuptools-scm 39 wheel 40 ]; 41 42 propagatedBuildInputs = [ 43 botorch 44 ipywidgets 45 jinja2 46 pandas 47 plotly 48 typeguard 49 pyre-extensions 50 ]; 51 52 env.ALLOW_BOTORCH_LATEST = "1"; 53 54 checkInputs = [ 55 hypothesis 56 mercurial 57 pyfakefs 58 pytestCheckHook 59 yappi 60 ]; 61 pytestFlagsArray = [ 62 "--ignore=ax/benchmark" 63 "--ignore=ax/runners/tests/test_torchx.py" 64 # requires pyre_extensions 65 "--ignore=ax/telemetry/tests" 66 "--ignore=ax/core/tests/test_utils.py" 67 "--ignore=ax/early_stopping/tests/test_strategies.py" 68 # broken with sqlalchemy 2 69 "--ignore=ax/service/tests/test_ax_client.py" 70 "--ignore=ax/service/tests/test_scheduler.py" 71 "--ignore=ax/service/tests/test_with_db_settings_base.py" 72 "--ignore=ax/storage" 73 ]; 74 disabledTests = [ 75 # exact comparison of floating points 76 "test_optimize_l0_homotopy" 77 # AssertionError: 5 != 2 78 "test_get_standard_plots_moo" 79 # AssertionError: Expected 'warning' to be called once. Called 3 times 80 "test_validate_kwarg_typing" 81 # uses torch.equal 82 "test_convert_observations" 83 ]; 84 pythonImportsCheck = [ "ax" ]; 85 86 # Many portions of the test suite fail under Python 3.12 87 doCheck = lib.versions.majorMinor python.version != "3.12"; 88 89 passthru.tests.check = ax.overridePythonAttrs { doCheck = true; }; 90 91 meta = with lib; { 92 description = "Ax is an accessible, general-purpose platform for understanding, managing, deploying, and automating adaptive experiments"; 93 homepage = "https://ax.dev/"; 94 license = licenses.mit; 95 maintainers = with maintainers; [ veprbl ]; 96 }; 97}