Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at domenkozar-patch-1 171 lines 4.1 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_logging.py" 118 "tests/unit_tests_old/test_metric_internal.py" 119 "tests/unit_tests_old/test_public_api.py" 120 "tests/unit_tests_old/test_report_api.py" 121 "tests/unit_tests_old/test_runtime.py" 122 "tests/unit_tests_old/test_sender.py" 123 "tests/unit_tests_old/test_tb_watcher.py" 124 "tests/unit_tests_old/test_time_resolution.py" 125 "tests/unit_tests_old/test_wandb_agent.py" 126 "tests/unit_tests_old/test_wandb_artifacts.py" 127 "tests/unit_tests_old/test_wandb_integration.py" 128 "tests/unit_tests_old/test_wandb_run.py" 129 "tests/unit_tests/test_cli.py" 130 "tests/unit_tests/test_data_types.py" 131 "tests/unit_tests/test_file_upload.py" 132 "tests/unit_tests/test_footer.py" 133 "tests/unit_tests/test_internal_api.py" 134 "tests/unit_tests/test_label_full.py" 135 "tests/unit_tests/test_login.py" 136 "tests/unit_tests/test_metric_full.py" 137 "tests/unit_tests/test_metric_internal.py" 138 "tests/unit_tests/test_mode_disabled.py" 139 "tests/unit_tests/test_model_workflows.py" 140 "tests/unit_tests/test_mp_full.py" 141 "tests/unit_tests/test_plots.py" 142 "tests/unit_tests/test_public_api.py" 143 "tests/unit_tests/test_runtime.py" 144 "tests/unit_tests/test_sender.py" 145 "tests/unit_tests/test_start_method.py" 146 "tests/unit_tests/test_tb_watcher.py" 147 "tests/unit_tests/test_telemetry_full.py" 148 "tests/unit_tests/test_util.py" 149 150 # Tries to access /homeless-shelter 151 "tests/unit_tests/test_tables.py" 152 ]; 153 154 # Disable test that fails on darwin due to issue with python3Packages.psutil: 155 # https://github.com/giampaolo/psutil/issues/1219 156 disabledTests = lib.optionals stdenv.isDarwin [ 157 "test_tpu_system_stats" 158 ]; 159 160 pythonImportsCheck = [ 161 "wandb" 162 ]; 163 164 meta = with lib; { 165 description = "A CLI and library for interacting with the Weights and Biases API"; 166 homepage = "https://github.com/wandb/wandb"; 167 changelog = "https://github.com/wandb/wandb/raw/v${version}/CHANGELOG.md"; 168 license = licenses.mit; 169 maintainers = with maintainers; [ samuela ]; 170 }; 171}