From 270b07fcc537000a570c54504eb4724803c0aa87 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 6 Mar 2022 23:46:59 +0100 Subject: [PATCH] python3Packages.tensorboard: rename from tensorflow-tensorboard, relax deps --- pkgs/development/python-modules/objax/default.nix | 4 ++-- .../python-modules/pytorch-lightning/default.nix | 4 ++-- pkgs/development/python-modules/pytorch/default.nix | 4 ++-- .../{tensorflow-tensorboard => tensorboard}/1/default.nix | 0 .../{tensorflow-tensorboard => tensorboard}/default.nix | 8 ++++---- pkgs/development/python-modules/tensorboardx/default.nix | 4 ++-- pkgs/development/python-modules/tensorflow/bin.nix | 6 +++--- pkgs/development/python-modules/tensorflow/default.nix | 8 ++++---- pkgs/development/python-modules/test-tube/default.nix | 4 ++-- .../python-modules/torch-tb-profiler/default.nix | 4 ++-- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 4 ++-- 12 files changed, 26 insertions(+), 25 deletions(-) rename pkgs/development/python-modules/{tensorflow-tensorboard => tensorboard}/1/default.nix (100%) rename pkgs/development/python-modules/{tensorflow-tensorboard => tensorboard}/default.nix (92%) diff --git a/pkgs/development/python-modules/objax/default.nix b/pkgs/development/python-modules/objax/default.nix index da0a70aafb4c..84d56962cc4d 100644 --- a/pkgs/development/python-modules/objax/default.nix +++ b/pkgs/development/python-modules/objax/default.nix @@ -7,7 +7,7 @@ , parameterized , pillow , scipy -, tensorflow-tensorboard +, tensorboard }: buildPythonPackage rec { @@ -33,7 +33,7 @@ buildPythonPackage rec { parameterized pillow scipy - tensorflow-tensorboard + tensorboard ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/pytorch-lightning/default.nix b/pkgs/development/python-modules/pytorch-lightning/default.nix index 83cd9d175ada..d3c9a9655159 100644 --- a/pkgs/development/python-modules/pytorch-lightning/default.nix +++ b/pkgs/development/python-modules/pytorch-lightning/default.nix @@ -6,7 +6,7 @@ , pytestCheckHook , pytorch , pyyaml -, tensorflow-tensorboard +, tensorboard , tqdm }: buildPythonPackage rec { @@ -26,7 +26,7 @@ buildPythonPackage rec { future pytorch pyyaml - tensorflow-tensorboard + tensorboard tqdm ]; diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix index c370eaf6a942..50d1342cacd9 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/pytorch/default.nix @@ -25,7 +25,7 @@ ninja, # dependencies for torch.utils.tensorboard - pillow, six, future, tensorflow-tensorboard, protobuf, + pillow, six, future, tensorboard, protobuf, isPy3k, pythonOlder }: @@ -230,7 +230,7 @@ in buildPythonPackage rec { pyyaml typing-extensions # the following are required for tensorboard support - pillow six future tensorflow-tensorboard protobuf + pillow six future tensorboard protobuf ] ++ lib.optionals MPISupport [ mpi ] ++ lib.optionals (pythonOlder "3.7") [ dataclasses ]; diff --git a/pkgs/development/python-modules/tensorflow-tensorboard/1/default.nix b/pkgs/development/python-modules/tensorboard/1/default.nix similarity index 100% rename from pkgs/development/python-modules/tensorflow-tensorboard/1/default.nix rename to pkgs/development/python-modules/tensorboard/1/default.nix diff --git a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix b/pkgs/development/python-modules/tensorboard/default.nix similarity index 92% rename from pkgs/development/python-modules/tensorflow-tensorboard/default.nix rename to pkgs/development/python-modules/tensorboard/default.nix index ceebad2a4769..502c17e56368 100644 --- a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix +++ b/pkgs/development/python-modules/tensorboard/default.nix @@ -22,14 +22,13 @@ # buildBazelPackage. buildPythonPackage rec { - pname = "tensorflow-tensorboard"; + pname = "tensorboard"; version = "2.6.0"; format = "wheel"; disabled = pythonOlder "3.6" || pythonAtLeast "3.10"; src = fetchPypi { - pname = "tensorboard"; - inherit version format; + inherit pname version format; dist = "py3"; python = "py3"; sha256 = "sha256-99rEzftS0UyeP3RYXOKq+OYgNiCoZOUfr4SYiwn3u9s="; @@ -42,7 +41,8 @@ buildPythonPackage rec { pushd unpacked/tensorboard-${version} substituteInPlace tensorboard-${version}.dist-info/METADATA \ - --replace "google-auth (<2,>=1.6.3)" "google-auth (<3,>=1.6.3)" + --replace "google-auth (<2,>=1.6.3)" "google-auth (<3,>=1.6.3)" \ + --replace "google-auth-oauthlib (<0.5,>=0.4.1)" "google-auth-oauthlib (<0.6,>=0.4.1)" popd wheel pack ./unpacked/tensorboard-${version} diff --git a/pkgs/development/python-modules/tensorboardx/default.nix b/pkgs/development/python-modules/tensorboardx/default.nix index eacb5b4cdc80..2dc421e3c8a0 100644 --- a/pkgs/development/python-modules/tensorboardx/default.nix +++ b/pkgs/development/python-modules/tensorboardx/default.nix @@ -13,7 +13,7 @@ , pytorch , six , soundfile -, tensorflow-tensorboard +, tensorboard , torchvision }: @@ -56,7 +56,7 @@ buildPythonPackage rec { pillow pytestCheckHook pytorch - tensorflow-tensorboard + tensorboard torchvision ]; diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index 2556a8039c1b..2c47f8674e0e 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -18,7 +18,7 @@ , opt-einsum , backports_weakref , tensorflow-estimator -, tensorflow-tensorboard +, tensorboard , cudaSupport ? false , cudatoolkit , cudnn @@ -74,7 +74,7 @@ in buildPythonPackage { google-pasta wrapt tensorflow-estimator - tensorflow-tensorboard + tensorboard keras-applications keras-preprocessing h5py @@ -168,7 +168,7 @@ in buildPythonPackage { ''; # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow - # and the propagated input tensorflow-tensorboard, which causes environment collisions. + # and the propagated input tensorboard, which causes environment collisions. # Another possibility would be to have tensorboard only in the buildInputs # See https://github.com/NixOS/nixpkgs/pull/44381 for more information. postInstall = '' diff --git a/pkgs/development/python-modules/tensorflow/default.nix b/pkgs/development/python-modules/tensorflow/default.nix index 517faef3f8fc..039e6c129b93 100644 --- a/pkgs/development/python-modules/tensorflow/default.nix +++ b/pkgs/development/python-modules/tensorflow/default.nix @@ -3,7 +3,7 @@ # Python deps , buildPythonPackage, pythonOlder, python # Python libraries -, numpy, tensorflow-tensorboard, absl-py +, numpy, tensorboard, absl-py , setuptools, wheel, keras, keras-preprocessing, google-pasta , opt-einsum, astunparse, h5py , termcolor, grpcio, six, wrapt, protobuf-python, tensorflow-estimator @@ -94,8 +94,8 @@ let setuptools six tblib + tensorboard tensorflow-estimator - tensorflow-tensorboard termcolor typing-extensions wheel @@ -439,7 +439,7 @@ in buildPythonPackage { ''; # Upstream has a pip hack that results in bin/tensorboard being in both tensorflow - # and the propagated input tensorflow-tensorboard, which causes environment collisions. + # and the propagated input tensorboard, which causes environment collisions. # Another possibility would be to have tensorboard only in the buildInputs # https://github.com/tensorflow/tensorflow/blob/v1.7.1/tensorflow/tools/pip_package/setup.py#L79 postInstall = '' @@ -469,7 +469,7 @@ in buildPythonPackage { typing-extensions wrapt ] ++ lib.optionals withTensorboard [ - tensorflow-tensorboard + tensorboard ]; # remove patchelfUnstable once patchelf 0.14 with https://github.com/NixOS/patchelf/pull/256 becomes the default diff --git a/pkgs/development/python-modules/test-tube/default.nix b/pkgs/development/python-modules/test-tube/default.nix index 1cc20cc2cca7..5eac0d60b6cf 100644 --- a/pkgs/development/python-modules/test-tube/default.nix +++ b/pkgs/development/python-modules/test-tube/default.nix @@ -8,7 +8,7 @@ , numpy , pandas , pytorch -, tensorflow-tensorboard +, tensorboard }: buildPythonPackage rec { @@ -34,7 +34,7 @@ buildPythonPackage rec { numpy pandas pytorch - tensorflow-tensorboard + tensorboard ]; meta = with lib; { diff --git a/pkgs/development/python-modules/torch-tb-profiler/default.nix b/pkgs/development/python-modules/torch-tb-profiler/default.nix index fc53c5ba8232..284391061367 100644 --- a/pkgs/development/python-modules/torch-tb-profiler/default.nix +++ b/pkgs/development/python-modules/torch-tb-profiler/default.nix @@ -4,7 +4,7 @@ , pandas , pytestCheckHook , pytorch -, tensorflow-tensorboard +, tensorboard , torchvision }: @@ -25,7 +25,7 @@ buildPythonPackage rec { # See https://discourse.nixos.org/t/extracting-sub-directory-from-fetchgit-or-fetchurl-or-any-derivation/8830. src = "${repo}/tb_plugin"; - propagatedBuildInputs = [ pandas tensorflow-tensorboard ]; + propagatedBuildInputs = [ pandas tensorboard ]; checkInputs = [ pytestCheckHook pytorch torchvision ]; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index ed64f987d957..b8ea307917db 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -123,6 +123,7 @@ mapAliases ({ tensorflow-bin_2 = tensorflow-bin; # added 2021-11-25 tensorflow-build_2 = tensorflow-build; # added 2021-11-25 tensorflow-estimator_2 = tensorflow-estimator; # added 2021-11-25 + tensorflow-tensorboard = tensorboard; # added 2022-03-06 tensorflow-tensorboard_2 = tensorflow-tensorboard; # added 2021-11-25 topydo = throw "topydo was moved to pkgs.topydo"; # added 2017-09-22 tvnamer = throw "tvnamer was moved to pkgs.tvnamer"; # added 2021-07-05 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1293b0853862..4d2659f35db7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9780,6 +9780,8 @@ in { tensorboard-plugin-wit = callPackage ../development/python-modules/tensorboard-plugin-wit { }; + tensorboard = callPackage ../development/python-modules/tensorboard { }; + tensorboardx = callPackage ../development/python-modules/tensorboardx { }; tensorflow-bin = callPackage ../development/python-modules/tensorflow/bin.nix { @@ -9812,8 +9814,6 @@ in { tensorflow = self.tensorflow-build; - tensorflow-tensorboard = callPackage ../development/python-modules/tensorflow-tensorboard { }; - tensorflowWithCuda = self.tensorflow.override { cudaSupport = true; };