Skip to content

Commit

Permalink
Revert "python3Packages.tensorflow: 2.8.0 -> 2.9.0"
Browse files Browse the repository at this point in the history
This reverts commit f98680b.
  • Loading branch information
jsoo1 committed Oct 26, 2023
1 parent 938d935 commit 0d81a04
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/tensorboard/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@

buildPythonPackage rec {
pname = "tensorboard";
version = "2.9.0";
version = "2.8.0";
format = "wheel";
disabled = pythonOlder "3.6" || pythonAtLeast "3.11";

src = fetchPypi {
inherit pname version format;
dist = "py3";
python = "py3";
hash = "sha256-vXghEHbcpe+icmCvrPqpbNBcfbEqbAnMdqHWsph8piE=";
hash = "sha256-ZaM45EJOkHnyYEkjvb4wF5KtzirOG+aNprPd8AUXDe8=";
};

postPatch = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

buildPythonPackage rec {
pname = "tensorflow-estimator";
version = "2.9.0";
version = "2.8.0";
format = "wheel";

src = fetchPypi {
pname = "tensorflow_estimator";
inherit version format;
hash = "sha256-6XYrswL1G8HrLzXRnwGQpqLYCddU1d73iMQyj+N0Z0Q=";
hash = "sha256-vujgUgxgrn6vbKjLRsWp9LRXJVMTgNuPvjj8tIR4trs=";
};

propagatedBuildInputs = [ mock numpy absl-py ];
Expand Down
29 changes: 11 additions & 18 deletions pkgs/development/python-modules/tensorflow/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, buildPythonPackage, pythonOlder, python
# Python libraries
, numpy, tensorboard, absl-py
, packaging, setuptools, wheel, keras, keras-preprocessing, google-pasta
, setuptools, wheel, keras, keras-preprocessing, google-pasta
, opt-einsum, astunparse, h5py
, termcolor, grpcio, six, wrapt, protobuf-python, tensorflow-estimator
, dill, flatbuffers-python, portpicker, tblib, typing-extensions
Expand Down Expand Up @@ -76,7 +76,7 @@ let

tfFeature = x: if x then "1" else "0";

version = "2.9.0";
version = "2.8.0";
variant = if cudaSupport then "-gpu" else "";
pname = "tensorflow${variant}";

Expand All @@ -94,7 +94,6 @@ let
keras-preprocessing
numpy
opt-einsum
packaging
protobuf-python
setuptools
six
Expand Down Expand Up @@ -190,7 +189,7 @@ let
owner = "tensorflow";
repo = "tensorflow";
rev = "v${version}";
hash = "sha256-9VsgNvl+2gxxkC4F+pq4ABuOONpcf96Qbk46shDRpVY=";
hash = "sha256-w78ehpsnXElIyYftgZEq3b/+TSrRN1gyWVUVlSZpGFM=";
};

# On update, it can be useful to steal the changes from gentoo
Expand Down Expand Up @@ -351,13 +350,7 @@ let
bazelBuildFlags = [
"--config=opt" # optimize using the flags set in the configure phase
]
++ lib.optionals stdenv.cc.isClang [
"--cxxopt=-x" "--cxxopt=c++"
"--host_cxxopt=-x" "--host_cxxopt=c++"

# workaround for https://github.com/bazelbuild/bazel/issues/15359
"--spawn_strategy=sandboxed"
]
++ lib.optionals stdenv.cc.isClang [ "--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++" ]
++ lib.optionals (mklSupport) [ "--config=mkl" ];

bazelTarget = "//tensorflow/tools/pip_package:build_pip_package //tensorflow/tools/lib_package:libtensorflow";
Expand All @@ -369,12 +362,12 @@ let
fetchAttrs = {
# cudaSupport causes fetch of ncclArchive, resulting in different hashes
sha256 = if cudaSupport then
"sha256-mcK60pLz70tOAu1+THUXweiO2SCSFUdFdT91HaUokzA="
"sha256-dQEyfueuQPcGvbhuh8Al45np3nRLDw2PCfC2lEqAH50="
else
if stdenv.isDarwin then
"sha256-j2k9Q+k41nq5nP1VjjkkNjXRov1uAda4RCMDMAthjrk="
"sha256-yfnZVtKWqNQGvlfq2owXhem0LmzDYriVfYgf1ZRlaDo="
else
"sha256-teW6o9Fb4hUxmaHpQU2F+5ihE/DA+MIY8QaMEKMnFiE=";
"sha256:12i1ix2xwq77f3h8qr4h57g0aazrdsjjqa536cpwx3n1mvl5p6qi";
};

buildAttrs = {
Expand Down Expand Up @@ -435,15 +428,16 @@ in buildPythonPackage {
src = bazel-build.python;

# Adjust dependency requirements:
# - Relax flatbuffers and gast version requirements
# - Relax gast version requirement that doesn't match what we have packaged
# - Relax tf-estimator, that would require a nightly version
# - The purpose of python3Packages.libclang is not clear at the moment and we don't have it packaged yet
# - keras and tensorlow-io-gcs-filesystem will be considered as optional for now.
postPatch = ''
sed -i setup.py \
-e "s/'flatbuffers[^']*',/'flatbuffers',/" \
-e "s/'gast[^']*',/'gast',/" \
-e "s/'tf-estimator-nightly[^']*',/'tensorflow-estimator',/" \
-e "/'libclang[^']*',/d" \
-e "/'keras[^']*')\?,/d" \
-e "/'keras[^']*',/d" \
-e "/'tensorflow-io-gcs-filesystem[^']*',/d"
'';

Expand Down Expand Up @@ -475,7 +469,6 @@ in buildPythonPackage {
keras-preprocessing
numpy
opt-einsum
packaging
protobuf-python
six
tensorflow-estimator
Expand Down

0 comments on commit 0d81a04

Please sign in to comment.