Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/dm-sonnet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, wrapt
, tensorflow
, tensorflow-probability
, tensorflow-estimator
}:

let
Expand Down Expand Up @@ -73,6 +74,7 @@ in buildPythonPackage rec {
wrapt
tensorflow
tensorflow-probability
tensorflow-estimator
];

# not sure how to properly run the real test suite -- through bazel?
Expand Down
26 changes: 26 additions & 0 deletions pkgs/development/python-modules/google-pasta/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
, six
}:

buildPythonPackage rec {
pname = "google-pasta";
version = "0.1.7";

src = fetchPypi {
inherit pname version;
sha256 = "1zmqfvy28i2509277s6sz098kddd16cx21vpxyc8xml1nclcxlbr";
};

propagatedBuildInputs = [
six
];

meta = {
description = "An AST-based Python refactoring library";
homepage = https://github.com/google/pasta;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ timokau ];
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

buildPythonPackage rec {
pname = "tensorflow-estimator";
version = "1.13.0";
version = "1.14.0";
format = "wheel";

src = fetchPypi {
pname = "tensorflow_estimator";
inherit version format;
sha256 = "068l4w0w7dj9gqkf8avjclq9zsp7ifwzw4rpf4qjylz3hczamzbw";
sha256 = "14irpsyj14vn2dpwr601f54058wywci1pv0hss8s01rl0rk3y1ya";
};

propagatedBuildInputs = [ mock numpy absl-py ];
Expand Down
35 changes: 28 additions & 7 deletions pkgs/development/python-modules/tensorflow-probability/default.nix
Original file line number Diff line number Diff line change
@@ -1,35 +1,56 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, python
, tensorflow
, decorator
, cloudpickle
, hypothesis
, scipy
, matplotlib
, mock
, pytest
}:

buildPythonPackage rec {
pname = "tensorflow-probability";
version = "0.6.0";
version = "0.7";

src = fetchFromGitHub {
owner = "tensorflow";
repo = "probability";
rev = "v${version}";
sha256 = "1y210n4asv8j39pk68bdfrz01gddflvzhxbcvj5jw6rjgaagnhvx";
sha256 = "0sy9gmjcvmwciamqvd7kd9qw2wd7ksklk80815fsn7sj0wiqxjyd";
};

propagatedBuildInputs = [
tensorflow
decorator
cloudpickle
];

# Listed here:
# https://github.com/tensorflow/probability/blob/f01d27a6f256430f03b14beb14d37def726cb257/testing/run_tests.sh#L58
checkInputs = [
hypothesis
pytest
scipy
matplotlib
mock
];

# Tests have an invalid import (`tensorflow_probability.opensource`), should
# be resolved in the next version with
# https://github.com/tensorflow/probability/commit/77d5957f2f0bdddcb46582799cd9c5c5167a1a40
doCheck = false;
# actual checks currently fail because for some reason
# tf.enable_eager_execution is called too late. Probably because upstream
# intents these tests to be run by bazel, not plain pytest.
# checkPhase = ''
# # tests need to import from other test files
# export PYTHONPATH="$PWD/tensorflow-probability:$PYTHONPATH"
# py.test
# '';

# sanity check
checkPhase = ''
py.test
python -c 'import tensorflow_probability'
'';

meta = with lib; {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

buildPythonPackage rec {
pname = "tensorflow-tensorboard";
version = "1.13.0";
version = "1.14.0";
format = "wheel";

src = fetchPypi ({
Expand All @@ -23,10 +23,10 @@ buildPythonPackage rec {
format = "wheel";
} // (if isPy3k then {
python = "py3";
sha256 = "19ixs811ndx8qh72dif0ywjss3rv7pf1khsgg6rvfjb9nw8wgjc2";
sha256 = "1z631614jk5zgasgmwfr33gz8bwv11p9f5llzlwvx3a8rnyv3q2h";
} else {
python = "py2";
sha256 = "0qpv6jsf6jjvdl95qvarn006kfj5a99mq925d73xg4af50ssvkrf";
sha256 = "1clv29yy942l3mfar2z6wkkk6l18fz7j6mi2dfz24j9dln0scny3";
}));

propagatedBuildInputs = [
Expand Down
24 changes: 20 additions & 4 deletions pkgs/development/python-modules/tensorflow/bin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
, isPy3k, pythonOlder
, astor
, gast
, google-pasta
, wrapt
, numpy
, six
, termcolor
Expand Down Expand Up @@ -41,7 +43,7 @@ let

in buildPythonPackage rec {
pname = "tensorflow";
version = "1.13.1";
version = "1.14.0";
format = "wheel";

src = let
Expand All @@ -53,9 +55,23 @@ in buildPythonPackage rec {
dls = import (./. + "/tf${version}-hashes.nix");
in fetchurl dls.${key};

propagatedBuildInputs = [ protobuf numpy termcolor grpcio six astor absl-py gast tensorflow-estimator tensorflow-tensorboard keras-applications keras-preprocessing ]
++ lib.optional (!isPy3k) mock
++ lib.optionals (pythonOlder "3.4") [ backports_weakref ];
propagatedBuildInputs = [
protobuf
numpy
termcolor
grpcio
six
astor
absl-py
gast
google-pasta
wrapt
tensorflow-estimator
tensorflow-tensorboard
keras-applications
keras-preprocessing
] ++ lib.optional (!isPy3k) mock
++ lib.optionals (pythonOlder "3.4") [ backports_weakref ];

# Upstream has a pip hack that results in bin/tensorboard being in both tensorflow
# and the propageted input tensorflow-tensorboard which causes environment collisions.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/tensorflow/prefetcher.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=1.13.1
version=1.14.0
hashfile=tf${version}-hashes.nix
rm -f $hashfile
echo "{" >> $hashfile
Expand Down
42 changes: 0 additions & 42 deletions pkgs/development/python-modules/tensorflow/tf1.13.1-hashes.nix

This file was deleted.

42 changes: 42 additions & 0 deletions pkgs/development/python-modules/tensorflow/tf1.14.0-hashes.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
linux_py_27_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp27-none-linux_x86_64.whl";
sha256 = "0yywdrfk97dh1bxhibspg0raz70fx9lcczj6xlimqy4xb60clx7k";
};
linux_py_35_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp35-cp35m-linux_x86_64.whl";
sha256 = "1xvyb6xcrjhlwvrmrhn5vs9xy7g98smqmpv4i3hhpry4qyasphhj";
};
linux_py_36_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp36-cp36m-linux_x86_64.whl";
sha256 = "1psd9vyxz9f39dwj77nvrg373sxv3p5vdp9fnz81dpsm0b0mwl44";
};
linux_py_37_cpu = {
url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.14.0-cp37-cp37m-linux_x86_64.whl";
sha256 = "0bg2sb1n2ag27r7ww695kg5hb0mjrw4kc5893krmixx2j71860c5";
};
linux_py_27_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp27-none-linux_x86_64.whl";
sha256 = "0y1x91gayg6pjddgl8ndcm63wfzhyv4s5khgl7ffzsgni1ivaqw5";
};
linux_py_35_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp35-cp35m-linux_x86_64.whl";
sha256 = "03piggpbz1jx8m2b95spq3jrdff4w6xx63ji07am7hyw2nsgx3mx";
};
linux_py_36_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp36-cp36m-linux_x86_64.whl";
sha256 = "0ypkp8cfhharsyyikb1qgf44cfm6284km9xswzvzymjzz75vg3gd";
};
linux_py_37_gpu = {
url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.14.0-cp37-cp37m-linux_x86_64.whl";
sha256 = "0virp8nn2ysx4855hq29kas6fm6b3dsiybwzdxy9nnb9n2d8qlm2";
};
mac_py_2_cpu = {
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py2-none-any.whl";
sha256 = "14f86k3pgq7z6i4s4im55zpp38f0drnm7xlclavsgcc0nxnj3z26";
};
mac_py_3_cpu = {
url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py3-none-any.whl";
sha256 = "0f3swpcjfgqhj6h5wnx8snc0xjkx4hnkqx83fmlrwpncs8c131d3";
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,8 @@ in {

google-music-utils = callPackage ../development/python-modules/google-music-utils { };

google-pasta = callPackage ../development/python-modules/google-pasta { };

gpapi = callPackage ../development/python-modules/gpapi { };
gplaycli = callPackage ../development/python-modules/gplaycli { };

Expand Down