1{ 2 lib, 3 botorch, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hypothesis, 7 ipywidgets, 8 jinja2, 9 jupyter, 10 mercurial, 11 pandas, 12 plotly, 13 pyfakefs, 14 pyre-extensions, 15 pytestCheckHook, 16 pythonAtLeast, 17 pythonOlder, 18 setuptools-scm, 19 setuptools, 20 sqlalchemy, 21 stdenvNoCC, 22 tabulate, 23 typeguard, 24 yappi, 25}: 26 27buildPythonPackage rec { 28 pname = "ax-platform"; 29 version = "0.5.0"; 30 pyproject = true; 31 32 disabled = pythonOlder "3.10"; 33 34 src = fetchFromGitHub { 35 owner = "facebook"; 36 repo = "ax"; 37 tag = version; 38 hash = "sha256-CMKdnPvzQ9tvU9/01mRaWi/Beuyo19CtaXNJCoiwLOw="; 39 }; 40 41 env.ALLOW_BOTORCH_LATEST = "1"; 42 43 build-system = [ 44 setuptools 45 setuptools-scm 46 ]; 47 48 dependencies = [ 49 botorch 50 ipywidgets 51 jinja2 52 pandas 53 plotly 54 typeguard 55 pyre-extensions 56 ]; 57 58 optional-dependencies = { 59 mysql = [ sqlalchemy ]; 60 notebook = [ jupyter ]; 61 }; 62 63 nativeCheckInputs = [ 64 hypothesis 65 mercurial 66 pyfakefs 67 pytestCheckHook 68 tabulate 69 yappi 70 ] ++ lib.flatten (lib.attrValues optional-dependencies); 71 72 disabledTestPaths = [ 73 "ax/benchmark" 74 "ax/runners/tests/test_torchx.py" 75 # broken with sqlalchemy 2 76 "ax/core/tests/test_experiment.py" 77 "ax/service/tests/test_ax_client.py" 78 "ax/service/tests/test_scheduler.py" 79 "ax/service/tests/test_with_db_settings_base.py" 80 "ax/storage" 81 ]; 82 83 disabledTests = 84 [ 85 # exact comparison of floating points 86 "test_optimize_l0_homotopy" 87 # AssertionError: 5 != 2 88 "test_get_standard_plots_moo" 89 # AssertionError: Expected 'warning' to be called once. Called 3 times 90 "test_validate_kwarg_typing" 91 # uses torch.equal 92 "test_convert_observations" 93 # broken with sqlalchemy 2 94 "test_sql_storage" 95 ] 96 ++ lib.optionals (pythonAtLeast "3.13") [ 97 # Both `metric_aggregation` and `criterion` must be `ReductionCriterion` 98 "test_SingleDiagnosticBestModelSelector_max_mean" 99 "test_SingleDiagnosticBestModelSelector_min_mean" 100 "test_SingleDiagnosticBestModelSelector_min_min" 101 "test_SingleDiagnosticBestModelSelector_model_cv_kwargs" 102 "test_init" 103 "test_gen" 104 # "use MIN or MAX" does not match "Both `metric_aggregation` and `criterion` must be `ReductionCriterion` 105 "test_user_input_error" 106 ] 107 ++ lib.optionals stdenvNoCC.hostPlatform.isDarwin [ 108 # flaky on x86 109 "test_gen_with_expanded_parameter_space" 110 ]; 111 112 pythonImportsCheck = [ "ax" ]; 113 114 meta = { 115 description = "Platform for understanding, managing, deploying, and automating adaptive experiments"; 116 homepage = "https://ax.dev/"; 117 changelog = "https://github.com/facebook/Ax/releases/tag/${version}"; 118 license = lib.licenses.mit; 119 maintainers = with lib.maintainers; [ veprbl ]; 120 }; 121}