at 24.05-pre 11 kB view raw
1{ lib 2, stdenv 3, appdirs 4, azure-containerregistry 5, azure-core 6, azure-identity 7, azure-storage-blob 8, bokeh 9, boto3 10, buildPythonPackage 11, click 12, docker_pycreds 13, fetchFromGitHub 14, flask 15, git 16, gitpython 17, google-cloud-artifact-registry 18, google-cloud-compute 19, google-cloud-storage 20, hypothesis 21, jsonref 22, jsonschema 23, keras 24, kubernetes 25, matplotlib 26, mlflow 27, nbclient 28, nbformat 29, pandas 30, parameterized 31, pathtools 32, protobuf 33, psutil 34, pydantic 35, pyfakefs 36, pytest-mock 37, pytest-xdist 38, pytestCheckHook 39, pythonOlder 40, pythonRelaxDepsHook 41, pyyaml 42, requests 43, responses 44, scikit-learn 45, sentry-sdk 46, setproctitle 47, setuptools 48, substituteAll 49, torch 50, tqdm 51}: 52 53buildPythonPackage rec { 54 pname = "wandb"; 55 version = "0.15.11"; 56 format = "pyproject"; 57 58 disabled = pythonOlder "3.6"; 59 60 src = fetchFromGitHub { 61 owner = pname; 62 repo = pname; 63 rev = "refs/tags/v${version}"; 64 hash = "sha256-WaVgyF+pQgFCqIsi5Tcu+btyUKU2e3/qJi4Ma8dnx8M="; 65 }; 66 67 patches = [ 68 # Replace git paths 69 (substituteAll { 70 src = ./hardcode-git-path.patch; 71 git = "${lib.getBin git}/bin/git"; 72 }) 73 ]; 74 75 nativeBuildInputs = [ 76 pythonRelaxDepsHook 77 setuptools 78 ]; 79 80 # setuptools is necessary since pkg_resources is required at runtime. 81 propagatedBuildInputs = [ 82 appdirs 83 click 84 docker_pycreds 85 gitpython 86 pathtools 87 protobuf 88 psutil 89 pyyaml 90 requests 91 sentry-sdk 92 setproctitle 93 setuptools 94 ]; 95 96 __darwinAllowLocalNetworking = true; 97 98 nativeCheckInputs = [ 99 azure-containerregistry 100 azure-core 101 azure-identity 102 azure-storage-blob 103 bokeh 104 boto3 105 flask 106 google-cloud-artifact-registry 107 google-cloud-compute 108 google-cloud-storage 109 hypothesis 110 jsonref 111 jsonschema 112 keras 113 kubernetes 114 matplotlib 115 mlflow 116 nbclient 117 nbformat 118 pandas 119 parameterized 120 pydantic 121 pyfakefs 122 pytest-mock 123 pytest-xdist 124 pytestCheckHook 125 responses 126 scikit-learn 127 torch 128 tqdm 129 ]; 130 131 # Set BOKEH_CDN_VERSION to stop bokeh throwing an exception in tests 132 preCheck = '' 133 export HOME=$(mktemp -d) 134 export BOKEH_CDN_VERSION=${bokeh.version} 135 ''; 136 137 pythonRelaxDeps = [ "protobuf" ]; 138 139 pytestFlagsArray = [ 140 # We want to run only unit tests 141 "tests/pytest_tests" 142 ]; 143 144 disabledTestPaths = [ 145 # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment. 146 "tests/pytest_tests/system_tests/test_notebooks/test_notebooks.py" 147 "tests/pytest_tests/unit_tests_old/test_cli.py" 148 "tests/pytest_tests/unit_tests_old/test_data_types.py" 149 "tests/pytest_tests/unit_tests_old/test_file_stream.py" 150 "tests/pytest_tests/unit_tests_old/test_file_upload.py" 151 "tests/pytest_tests/unit_tests_old/test_footer.py" 152 "tests/pytest_tests/unit_tests_old/test_internal_api.py" 153 "tests/pytest_tests/unit_tests_old/test_keras.py" 154 "tests/pytest_tests/unit_tests_old/test_logging.py" 155 "tests/pytest_tests/unit_tests_old/test_metric_internal.py" 156 "tests/pytest_tests/unit_tests_old/test_public_api.py" 157 "tests/pytest_tests/unit_tests_old/test_runtime.py" 158 "tests/pytest_tests/unit_tests_old/test_sender.py" 159 "tests/pytest_tests/unit_tests_old/test_summary.py" 160 "tests/pytest_tests/unit_tests_old/test_tb_watcher.py" 161 "tests/pytest_tests/unit_tests_old/test_time_resolution.py" 162 "tests/pytest_tests/unit_tests_old/test_wandb_agent.py" 163 "tests/pytest_tests/unit_tests_old/test_wandb_artifacts.py" 164 "tests/pytest_tests/unit_tests_old/test_wandb_integration.py" 165 "tests/pytest_tests/unit_tests_old/test_wandb_run.py" 166 "tests/pytest_tests/unit_tests_old/test_wandb.py" 167 "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_aws.py" 168 "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_cli.py" 169 "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_docker.py" 170 "tests/pytest_tests/unit_tests_old/tests_launch/test_launch.py" 171 "tests/pytest_tests/unit_tests/test_cli.py" 172 "tests/pytest_tests/unit_tests/test_data_types.py" 173 "tests/pytest_tests/unit_tests/test_internal_api.py" 174 "tests/pytest_tests/unit_tests/test_mode_disabled.py" 175 "tests/pytest_tests/unit_tests/test_model_workflows.py" 176 "tests/pytest_tests/unit_tests/test_plots.py" 177 "tests/pytest_tests/unit_tests/test_public_api.py" 178 "tests/pytest_tests/unit_tests/test_sender.py" 179 "tests/pytest_tests/unit_tests/test_util.py" 180 "tests/pytest_tests/unit_tests/test_wandb_verify.py" 181 182 # Requires docker access 183 "tests/pytest_tests/system_tests/test_artifacts/test_artifact_saver.py" 184 "tests/pytest_tests/system_tests/test_artifacts/test_wandb_artifacts_full.py" 185 "tests/pytest_tests/system_tests/test_artifacts/test_wandb_artifacts.py" 186 "tests/pytest_tests/system_tests/test_core/test_cli_full.py" 187 "tests/pytest_tests/system_tests/test_core/test_data_types_full.py" 188 "tests/pytest_tests/system_tests/test_core/test_file_stream_internal.py" 189 "tests/pytest_tests/system_tests/test_core/test_file_upload.py" 190 "tests/pytest_tests/system_tests/test_core/test_footer.py" 191 "tests/pytest_tests/system_tests/test_core/test_keras_full.py" 192 "tests/pytest_tests/system_tests/test_core/test_label_full.py" 193 "tests/pytest_tests/system_tests/test_core/test_metric_full.py" 194 "tests/pytest_tests/system_tests/test_core/test_metric_internal.py" 195 "tests/pytest_tests/system_tests/test_core/test_mode_disabled_full.py" 196 "tests/pytest_tests/system_tests/test_core/test_model_workflow.py" 197 "tests/pytest_tests/system_tests/test_core/test_mp_full.py" 198 "tests/pytest_tests/system_tests/test_core/test_public_api.py" 199 "tests/pytest_tests/system_tests/test_core/test_redir_full.py" 200 "tests/pytest_tests/system_tests/test_core/test_report_api.py" 201 "tests/pytest_tests/system_tests/test_core/test_runtime.py" 202 "tests/pytest_tests/system_tests/test_core/test_save_policies.py" 203 "tests/pytest_tests/system_tests/test_core/test_sender.py" 204 "tests/pytest_tests/system_tests/test_core/test_start_method.py" 205 "tests/pytest_tests/system_tests/test_core/test_system_info.py" 206 "tests/pytest_tests/system_tests/test_core/test_tb_watcher.py" 207 "tests/pytest_tests/system_tests/test_core/test_telemetry_full.py" 208 "tests/pytest_tests/system_tests/test_core/test_time_resolution.py" 209 "tests/pytest_tests/system_tests/test_core/test_torch_full.py" 210 "tests/pytest_tests/system_tests/test_core/test_validation_data_logger.py" 211 "tests/pytest_tests/system_tests/test_core/test_wandb_init.py" 212 "tests/pytest_tests/system_tests/test_core/test_wandb_integration.py" 213 "tests/pytest_tests/system_tests/test_core/test_wandb_run.py" 214 "tests/pytest_tests/system_tests/test_core/test_wandb_settings.py" 215 "tests/pytest_tests/system_tests/test_core/test_wandb_tensorflow.py" 216 "tests/pytest_tests/system_tests/test_core/test_wandb_verify.py" 217 "tests/pytest_tests/system_tests/test_core/test_wandb.py" 218 "tests/pytest_tests/system_tests/test_importers/test_import_mlflow.py" 219 "tests/pytest_tests/system_tests/test_nexus/test_nexus.py" 220 "tests/pytest_tests/system_tests/test_sweep/test_public_api.py" 221 "tests/pytest_tests/system_tests/test_sweep/test_sweep_scheduler.py" 222 "tests/pytest_tests/system_tests/test_sweep/test_sweep_utils.py" 223 "tests/pytest_tests/system_tests/test_sweep/test_wandb_agent_full.py" 224 "tests/pytest_tests/system_tests/test_sweep/test_wandb_agent.py" 225 "tests/pytest_tests/system_tests/test_sweep/test_wandb_sweep.py" 226 "tests/pytest_tests/system_tests/test_system_metrics/test_open_metrics.py" 227 "tests/pytest_tests/system_tests/test_launch/test_github_reference.py" 228 "tests/pytest_tests/system_tests/test_launch/test_job.py" 229 "tests/pytest_tests/system_tests/test_launch/test_launch_add.py" 230 "tests/pytest_tests/system_tests/test_launch/test_launch_cli.py" 231 "tests/pytest_tests/system_tests/test_launch/test_launch_kubernetes.py" 232 "tests/pytest_tests/system_tests/test_launch/test_launch_local_container.py" 233 "tests/pytest_tests/system_tests/test_launch/test_launch_run.py" 234 "tests/pytest_tests/system_tests/test_launch/test_launch_sagemaker.py" 235 "tests/pytest_tests/system_tests/test_launch/test_launch_sweep_cli.py" 236 "tests/pytest_tests/system_tests/test_launch/test_launch_sweep.py" 237 "tests/pytest_tests/system_tests/test_launch/test_launch.py" 238 "tests/pytest_tests/system_tests/test_launch/test_wandb_reference.py" 239 240 # Tries to access /homeless-shelter 241 "tests/pytest_tests/unit_tests/test_tables.py" 242 243 # E AssertionError: assert 'Cannot use both --async and --queue with wandb launch' in 'wandb: ERROR Find detailed error logs at: /build/source/wandb/debug-cli.nixbld.log\nError: The wandb service process exited with 1. Ensure that `sys.executable` is a valid python interpreter. You can override it with the `_executable` setting or with the `WANDB__EXECUTABLE` environment variable.\n' 244 # E + where 'wandb: ERROR Find detailed error logs at: /build/source/wandb/debug-cli.nixbld.log\nError: The wandb service process exited with 1. Ensure that `sys.executable` is a valid python interpreter. You can override it with the `_executable` setting or with the `WANDB__EXECUTABLE` environment variable.\n' = <Result SystemExit(1)>.output 245 "tests/pytest_tests/unit_tests_old/tests_launch/test_launch_jobs.py" 246 247 # Requires google-cloud-aiplatform which is not packaged as of 2023-04-25. 248 "tests/pytest_tests/unit_tests/test_launch/test_runner/test_vertex.py" 249 250 # Requires google-cloud-artifact-registry which is not packaged as of 2023-04-25. 251 "tests/pytest_tests/unit_tests_old/tests_launch/test_kaniko_build.py" 252 "tests/pytest_tests/unit_tests/test_launch/test_registry/test_gcp_artifact_registry.py" 253 254 # Requires kfp which is not packaged as of 2023-04-25. 255 "tests/pytest_tests/system_tests/test_core/test_kfp.py" 256 257 # Requires metaflow which is not packaged as of 2023-04-25. 258 "tests/pytest_tests/unit_tests/test_metaflow.py" 259 260 # Requires tensorflow which is broken as of 2023-09-03 261 "tests/pytest_tests/unit_tests/test_keras.py" 262 263 # Try to get hardware information, not possible in the nix build environment 264 "tests/pytest_tests/unit_tests/test_system_metrics/test_disk.py" 265 266 # See https://github.com/wandb/wandb/issues/5423 267 "tests/pytest_tests/unit_tests/test_docker.py" 268 "tests/pytest_tests/unit_tests/test_library_public.py" 269 ] ++ lib.optionals stdenv.isLinux [ 270 # Same as above 271 "tests/pytest_tests/unit_tests/test_artifacts/test_storage.py" 272 ] ++ lib.optionals stdenv.isDarwin [ 273 # Same as above 274 "tests/pytest_tests/unit_tests/test_lib/test_filesystem.py" 275 ]; 276 277 disabledTests = [ 278 # Timing sensitive 279 "test_login_timeout" 280 ] ++ lib.optionals stdenv.isDarwin [ 281 # Disable test that fails on darwin due to issue with python3Packages.psutil: 282 # https://github.com/giampaolo/psutil/issues/1219 283 "test_tpu_system_stats" 284 ]; 285 286 pythonImportsCheck = [ 287 "wandb" 288 ]; 289 290 meta = with lib; { 291 description = "A CLI and library for interacting with the Weights and Biases API"; 292 homepage = "https://github.com/wandb/wandb"; 293 changelog = "https://github.com/wandb/wandb/raw/v${version}/CHANGELOG.md"; 294 license = licenses.mit; 295 maintainers = with maintainers; [ samuela ]; 296 }; 297}