at 23.05-pre 4.0 kB view raw
1{ lib 2, stdenv 3, azure-core 4, bokeh 5, buildPythonPackage 6, click 7, docker_pycreds 8, fetchFromGitHub 9, flask 10, git 11, GitPython 12, jsonref 13, jsonschema 14, matplotlib 15, nbclient 16, nbformat 17, pandas 18, pathtools 19, promise 20, protobuf 21, psutil 22, pydantic 23, pytest-mock 24, pytest-xdist 25, pytestCheckHook 26, pythonOlder 27, pythonRelaxDepsHook 28, torch 29, pyyaml 30, requests 31, scikit-learn 32, sentry-sdk 33, setproctitle 34, setuptools 35, shortuuid 36, substituteAll 37, tqdm 38}: 39 40buildPythonPackage rec { 41 pname = "wandb"; 42 version = "0.13.5"; 43 format = "setuptools"; 44 45 disabled = pythonOlder "3.6"; 46 47 src = fetchFromGitHub { 48 owner = pname; 49 repo = pname; 50 rev = "refs/tags/v${version}"; 51 hash = "sha256-1GoFmncG5bUWJOIUDLatopQMxCFsmlcj8aofJMGUTzQ="; 52 }; 53 54 patches = [ 55 # Replace git paths 56 (substituteAll { 57 src = ./hardcode-git-path.patch; 58 git = "${lib.getBin git}/bin/git"; 59 }) 60 ]; 61 62 nativeBuildInputs = [ 63 pythonRelaxDepsHook 64 ]; 65 66 # setuptools is necessary since pkg_resources is required at runtime. 67 propagatedBuildInputs = [ 68 click 69 docker_pycreds 70 GitPython 71 pathtools 72 promise 73 protobuf 74 psutil 75 pyyaml 76 requests 77 sentry-sdk 78 setproctitle 79 setuptools 80 shortuuid 81 ]; 82 83 checkInputs = [ 84 azure-core 85 bokeh 86 flask 87 jsonref 88 jsonschema 89 matplotlib 90 nbclient 91 nbformat 92 pandas 93 pydantic 94 pytest-mock 95 pytest-xdist 96 pytestCheckHook 97 torch 98 scikit-learn 99 tqdm 100 ]; 101 102 preCheck = '' 103 export HOME=$(mktemp -d) 104 ''; 105 106 pythonRelaxDeps = [ "protobuf" ]; 107 108 disabledTestPaths = [ 109 # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment. 110 "tests/unit_tests_old/test_cli.py" 111 "tests/unit_tests_old/test_data_types.py" 112 "tests/unit_tests_old/test_file_stream.py" 113 "tests/unit_tests_old/test_file_upload.py" 114 "tests/unit_tests_old/test_footer.py" 115 "tests/unit_tests_old/test_internal_api.py" 116 "tests/unit_tests_old/test_keras.py" 117 "tests/unit_tests_old/test_metric_internal.py" 118 "tests/unit_tests_old/test_public_api.py" 119 "tests/unit_tests_old/test_report_api.py" 120 "tests/unit_tests_old/test_runtime.py" 121 "tests/unit_tests_old/test_sender.py" 122 "tests/unit_tests_old/test_tb_watcher.py" 123 "tests/unit_tests_old/test_time_resolution.py" 124 "tests/unit_tests_old/test_wandb_agent.py" 125 "tests/unit_tests_old/test_wandb_artifacts.py" 126 "tests/unit_tests_old/test_wandb_integration.py" 127 "tests/unit_tests_old/test_wandb_run.py" 128 "tests/unit_tests/test_cli.py" 129 "tests/unit_tests/test_data_types.py" 130 "tests/unit_tests/test_file_upload.py" 131 "tests/unit_tests/test_footer.py" 132 "tests/unit_tests/test_internal_api.py" 133 "tests/unit_tests/test_label_full.py" 134 "tests/unit_tests/test_login.py" 135 "tests/unit_tests/test_metric_full.py" 136 "tests/unit_tests/test_metric_internal.py" 137 "tests/unit_tests/test_mode_disabled.py" 138 "tests/unit_tests/test_model_workflows.py" 139 "tests/unit_tests/test_mp_full.py" 140 "tests/unit_tests/test_plots.py" 141 "tests/unit_tests/test_public_api.py" 142 "tests/unit_tests/test_runtime.py" 143 "tests/unit_tests/test_sender.py" 144 "tests/unit_tests/test_start_method.py" 145 "tests/unit_tests/test_tb_watcher.py" 146 "tests/unit_tests/test_telemetry_full.py" 147 "tests/unit_tests/test_util.py" 148 149 # Tries to access /homeless-shelter 150 "tests/unit_tests/test_tables.py" 151 ]; 152 153 # Disable test that fails on darwin due to issue with python3Packages.psutil: 154 # https://github.com/giampaolo/psutil/issues/1219 155 disabledTests = lib.optionals stdenv.isDarwin [ 156 "test_tpu_system_stats" 157 ]; 158 159 pythonImportsCheck = [ 160 "wandb" 161 ]; 162 163 meta = with lib; { 164 description = "A CLI and library for interacting with the Weights and Biases API"; 165 homepage = "https://github.com/wandb/wandb"; 166 changelog = "https://github.com/wandb/wandb/raw/v${version}/CHANGELOG.md"; 167 license = licenses.mit; 168 maintainers = with maintainers; [ samuela ]; 169 }; 170}