1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 7 # build-system 8 setuptools, 9 setuptools-scm, 10 11 # dependencies 12 botorch, 13 ipywidgets, 14 jinja2, 15 markdown, 16 pandas, 17 plotly, 18 pyre-extensions, 19 scikit-learn, 20 scipy, 21 sympy, 22 23 # tests 24 pyfakefs, 25 pytestCheckHook, 26 sqlalchemy, 27 tabulate, 28}: 29 30buildPythonPackage rec { 31 pname = "ax-platform"; 32 version = "1.0.0"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "facebook"; 37 repo = "ax"; 38 tag = version; 39 hash = "sha256-DFsV1w6J7bTZNUq9OYExDvfc7IfTcthGKAnRMNujRKI="; 40 }; 41 42 env.ALLOW_BOTORCH_LATEST = "1"; 43 44 build-system = [ 45 setuptools 46 setuptools-scm 47 ]; 48 49 dependencies = [ 50 botorch 51 ipywidgets 52 jinja2 53 markdown 54 pandas 55 plotly 56 pyre-extensions 57 scikit-learn 58 scipy 59 sympy 60 ]; 61 62 nativeCheckInputs = [ 63 pyfakefs 64 # pytest-xdist 65 pytestCheckHook 66 sqlalchemy 67 tabulate 68 ]; 69 70 disabledTestPaths = [ 71 "ax/benchmark" 72 "ax/runners/tests/test_torchx.py" 73 74 # broken with sqlalchemy 2 75 "ax/core/tests/test_experiment.py" 76 "ax/service/tests/test_ax_client.py" 77 "ax/service/tests/test_scheduler.py" 78 "ax/service/tests/test_with_db_settings_base.py" 79 80 # Hangs forever 81 "ax/analysis/plotly/tests/test_top_surfaces.py::TestTopSurfacesAnalysis::test_online" 82 ]; 83 84 disabledTests = [ 85 # sqlalchemy.exc.ArgumentError: Strings are not accepted for attribute names in loader options; please use class-bound attributes directly. 86 "SQAStoreUtilsTest" 87 "SQAStoreTest" 88 89 # ValueError: `db_settings` argument should be of type ax.storage.sqa_store 90 "test_get_next_trials_with_db" 91 92 # exact comparison of floating points 93 "test_optimize_l0_homotopy" 94 # AssertionError: 5 != 2 95 "test_get_standard_plots_moo" 96 # AssertionError: Expected 'warning' to be called once. Called 3 times 97 "test_validate_kwarg_typing" 98 # uses torch.equal 99 "test_convert_observations" 100 # broken with sqlalchemy 2 101 "test_sql_storage" 102 ] 103 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 104 # flaky on x86 105 "test_gen_with_expanded_parameter_space" 106 ]; 107 108 pythonImportsCheck = [ "ax" ]; 109 110 meta = { 111 description = "Platform for understanding, managing, deploying, and automating adaptive experiments"; 112 homepage = "https://ax.dev/"; 113 changelog = "https://github.com/facebook/Ax/releases/tag/${version}"; 114 license = lib.licenses.mit; 115 maintainers = with lib.maintainers; [ veprbl ]; 116 }; 117}