1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 alembic, 7 boto3, 8 botorch, 9 bottle, 10 cmaes, 11 colorlog, 12 moto, 13 numpy, 14 optuna, 15 packaging, 16 plotly, 17 pytestCheckHook, 18 setuptools, 19 scikit-learn, 20 scipy, 21 streamlit, 22 tqdm, 23}: 24 25buildPythonPackage rec { 26 pname = "optuna-dashboard"; 27 version = "0.20.0b1"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "optuna"; 32 repo = "optuna-dashboard"; 33 tag = "v${version}"; 34 hash = "sha256-+mS9D71cwVkO0AqtU0pxK0PBvwCOxA6dPJyTVps4X+g="; 35 }; 36 37 dependencies = [ 38 alembic 39 bottle 40 cmaes 41 colorlog 42 numpy 43 optuna 44 packaging 45 scikit-learn 46 scipy 47 tqdm 48 ]; 49 50 build-system = [ setuptools ]; 51 52 nativeCheckInputs = [ 53 pytestCheckHook 54 boto3 55 botorch 56 moto 57 plotly 58 streamlit 59 ]; 60 61 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ 62 # AttributeError: module 'numpy' has no attribute 'float128' ==> not available on 64-bit Darwin 63 "test_infer_sortable" 64 "test_serialize_numpy_floating" 65 ]; 66 67 # Disable tests that use playwright (needs network) 68 disabledTestPaths = [ 69 "e2e_tests/test_dashboard/test_usecases/test_preferential_optimization.py" 70 "e2e_tests/test_dashboard/test_usecases/test_study_history.py" 71 "e2e_tests/test_dashboard/visual_regression_test.py" 72 "e2e_tests/test_standalone/test_study_list.py" 73 ]; 74 75 pythonImportsCheck = [ "optuna_dashboard" ]; 76 77 # Temporarily disable tests as they hang due to a torch bug on darwin 78 # Will revert in https://github.com/NixOS/nixpkgs/pull/424873 79 doCheck = !stdenv.hostPlatform.isDarwin; 80 81 meta = { 82 description = "Real-time Web Dashboard for Optuna"; 83 homepage = "https://github.com/optuna/optuna-dashboard"; 84 changelog = "https://github.com/optuna/optuna-dashboard/releases/tag/${src.tag}"; 85 license = lib.licenses.mit; 86 maintainers = with lib.maintainers; [ jherland ]; 87 mainProgram = "optuna-dashboard"; 88 }; 89}