diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index 7f21877f1fb5..b4804176eddc 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -2,7 +2,6 @@ , bokeh , buildPythonPackage , click -, configparser , docker_pycreds , fetchFromGitHub , flask @@ -22,7 +21,6 @@ , pytest-mock , pytest-xdist , pytestCheckHook -, python , python-dateutil , pyyaml , requests @@ -33,35 +31,23 @@ , shortuuid , stdenv , tqdm -, yaspin }: buildPythonPackage rec { pname = "wandb"; - version = "0.12.11"; + version = "0.12.14"; src = fetchFromGitHub { owner = pname; repo = "client"; rev = "v${version}"; - sha256 = "0av4vv4llan40678bw0vlah0gn6hjg5pdqwq0c5cv15lqrdb8g32"; + hash = "sha256-60E64ePW+C0C/eG7pLp4SpAFqycOHiCvOvmNOg2yoqY="; }; - # The wandb requirements.txt does not distinguish python2/3 dependencies. We - # need to drop the subprocess32 dependency when building for python3. - patchPhase = '' - substituteInPlace requirements.txt --replace "subprocess32>=3.5.3" "" - ''; - - # git is not a setup.py dependency of wandb, but wandb does expect git to be - # in PATH. See https://gist.github.com/samuela/57aeee710e41ab2bf361b7ed8fbbeabf - # for the error message, and an example usage here: https://github.com/wandb/client/blob/master/wandb/sdk/internal/meta.py#L139-L141. # setuptools is necessary since pkg_resources is required at runtime. propagatedBuildInputs = [ click - configparser docker_pycreds - git GitPython pathtools promise @@ -74,9 +60,18 @@ buildPythonPackage rec { setproctitle setuptools shortuuid - yaspin ]; + # wandb expects git to be in PATH. See https://gist.github.com/samuela/57aeee710e41ab2bf361b7ed8fbbeabf + # for the error message, and an example usage here: https://github.com/wandb/client/blob/d5f655b7ca7e3eac2f3a67a84bc5c2a664a31baf/wandb/sdk/internal/meta.py#L128. + # See https://github.com/NixOS/nixpkgs/pull/164176#discussion_r828801621 as to + # why we don't put it in propagatedBuildInputs. Note that this is difficult to + # test offline due to https://github.com/wandb/client/issues/3519. + postInstall = '' + mkdir -p $out/bin + ln -s ${git}/bin/git $out/bin/git + ''; + disabledTestPaths = [ # Tests that try to get chatty over sockets or spin up servers, not possible in the nix build environment. "tests/test_cli.py" @@ -106,6 +101,7 @@ buildPythonPackage rec { "tests/wandb_settings_test.py" "tests/wandb_sweep_test.py" "tests/wandb_verify_test.py" + "tests/test_model_workflows.py" # Fails and borks the pytest runner as well. "tests/wandb_test.py"