nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 156 lines 3.5 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, python-dateutil 27, pythonOlder 28, pyyaml 29, requests 30, scikit-learn 31, sentry-sdk 32, setproctitle 33, setuptools 34, shortuuid 35, tqdm 36}: 37 38buildPythonPackage rec { 39 pname = "wandb"; 40 version = "0.12.16"; 41 format = "setuptools"; 42 43 disabled = pythonOlder "3.6"; 44 45 src = fetchFromGitHub { 46 owner = pname; 47 repo = "client"; 48 rev = "v${version}"; 49 hash = "sha256-ZY7nTj93piTEeHhW+H+nQ+ws2dDmmY6u3p7uz296PbA="; 50 }; 51 52 # setuptools is necessary since pkg_resources is required at runtime. 53 propagatedBuildInputs = [ 54 click 55 docker_pycreds 56 GitPython 57 pathtools 58 promise 59 protobuf 60 psutil 61 python-dateutil 62 pyyaml 63 requests 64 sentry-sdk 65 setproctitle 66 setuptools 67 shortuuid 68 ]; 69 70 # wandb expects git to be in PATH. See https://gist.github.com/samuela/57aeee710e41ab2bf361b7ed8fbbeabf 71 # for the error message, and an example usage here: https://github.com/wandb/client/blob/d5f655b7ca7e3eac2f3a67a84bc5c2a664a31baf/wandb/sdk/internal/meta.py#L128. 72 # See https://github.com/NixOS/nixpkgs/pull/164176#discussion_r828801621 as to 73 # why we don't put it in propagatedBuildInputs. Note that this is difficult to 74 # test offline due to https://github.com/wandb/client/issues/3519. 75 postInstall = '' 76 mkdir -p $out/bin 77 ln -s ${git}/bin/git $out/bin/git 78 ''; 79 80 preCheck = '' 81 export HOME=$(mktemp -d) 82 ''; 83 84 checkInputs = [ 85 azure-core 86 bokeh 87 flask 88 jsonref 89 jsonschema 90 matplotlib 91 nbclient 92 nbformat 93 pandas 94 pydantic 95 pytest-mock 96 pytest-xdist 97 pytestCheckHook 98 scikit-learn 99 tqdm 100 ]; 101 102 disabledTestPaths = [ 103 # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment. 104 "tests/test_cli.py" 105 "tests/test_data_types.py" 106 "tests/test_file_stream.py" 107 "tests/test_file_upload.py" 108 "tests/test_footer.py" 109 "tests/test_internal_api.py" 110 "tests/test_label_full.py" 111 "tests/test_login.py" 112 "tests/test_meta.py" 113 "tests/test_metric_full.py" 114 "tests/test_metric_internal.py" 115 "tests/test_mode_disabled.py" 116 "tests/test_mp_full.py" 117 "tests/test_public_api.py" 118 "tests/test_redir.py" 119 "tests/test_runtime.py" 120 "tests/test_sender.py" 121 "tests/test_start_method.py" 122 "tests/test_tb_watcher.py" 123 "tests/test_telemetry_full.py" 124 "tests/wandb_agent_test.py" 125 "tests/wandb_artifacts_test.py" 126 "tests/wandb_integration_test.py" 127 "tests/wandb_run_test.py" 128 "tests/wandb_settings_test.py" 129 "tests/wandb_sweep_test.py" 130 "tests/wandb_verify_test.py" 131 "tests/test_model_workflows.py" 132 133 # Fails and borks the pytest runner as well. 134 "tests/wandb_test.py" 135 136 # Tries to access /homeless-shelter 137 "tests/test_tables.py" 138 ]; 139 140 # Disable test that fails on darwin due to issue with python3Packages.psutil: 141 # https://github.com/giampaolo/psutil/issues/1219 142 disabledTests = lib.optional stdenv.isDarwin [ 143 "test_tpu_system_stats" 144 ]; 145 146 pythonImportsCheck = [ 147 "wandb" 148 ]; 149 150 meta = with lib; { 151 description = "A CLI and library for interacting with the Weights and Biases API"; 152 homepage = "https://github.com/wandb/client"; 153 license = licenses.mit; 154 maintainers = with maintainers; [ samuela ]; 155 }; 156}