diff --git a/pkgs/development/python-modules/dm-sonnet/default.nix b/pkgs/development/python-modules/dm-sonnet/default.nix index 1c972cb2aa02..41dc30e47190 100644 --- a/pkgs/development/python-modules/dm-sonnet/default.nix +++ b/pkgs/development/python-modules/dm-sonnet/default.nix @@ -11,6 +11,7 @@ , wrapt , tensorflow , tensorflow-probability +, tensorflow-estimator }: let @@ -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? diff --git a/pkgs/development/python-modules/google-pasta/default.nix b/pkgs/development/python-modules/google-pasta/default.nix new file mode 100644 index 000000000000..e469de924f6a --- /dev/null +++ b/pkgs/development/python-modules/google-pasta/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/development/python-modules/tensorflow-estimator/default.nix b/pkgs/development/python-modules/tensorflow-estimator/default.nix index 3b33ac413ba9..127e7560679a 100644 --- a/pkgs/development/python-modules/tensorflow-estimator/default.nix +++ b/pkgs/development/python-modules/tensorflow-estimator/default.nix @@ -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 ]; diff --git a/pkgs/development/python-modules/tensorflow-probability/default.nix b/pkgs/development/python-modules/tensorflow-probability/default.nix index aa32904b8d33..4b0e6e7722fe 100644 --- a/pkgs/development/python-modules/tensorflow-probability/default.nix +++ b/pkgs/development/python-modules/tensorflow-probability/default.nix @@ -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; { diff --git a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix index 7840e6de0092..fa1759119c9e 100644 --- a/pkgs/development/python-modules/tensorflow-tensorboard/default.nix +++ b/pkgs/development/python-modules/tensorflow-tensorboard/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "tensorflow-tensorboard"; - version = "1.13.0"; + version = "1.14.0"; format = "wheel"; src = fetchPypi ({ @@ -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 = [ diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index e4372fc2ec45..d02a4e1b9f29 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -5,6 +5,8 @@ , isPy3k, pythonOlder , astor , gast +, google-pasta +, wrapt , numpy , six , termcolor @@ -41,7 +43,7 @@ let in buildPythonPackage rec { pname = "tensorflow"; - version = "1.13.1"; + version = "1.14.0"; format = "wheel"; src = let @@ -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. diff --git a/pkgs/development/python-modules/tensorflow/prefetcher.sh b/pkgs/development/python-modules/tensorflow/prefetcher.sh index d4ec2e757b2a..3059340d127d 100644 --- a/pkgs/development/python-modules/tensorflow/prefetcher.sh +++ b/pkgs/development/python-modules/tensorflow/prefetcher.sh @@ -1,4 +1,4 @@ -version=1.13.1 +version=1.14.0 hashfile=tf${version}-hashes.nix rm -f $hashfile echo "{" >> $hashfile diff --git a/pkgs/development/python-modules/tensorflow/tf1.13.1-hashes.nix b/pkgs/development/python-modules/tensorflow/tf1.13.1-hashes.nix deleted file mode 100644 index bbfb0632c3c5..000000000000 --- a/pkgs/development/python-modules/tensorflow/tf1.13.1-hashes.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ -linux_py_27_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.13.1-cp27-none-linux_x86_64.whl"; - sha256 = "0y1vd3y5fxcjj5d35qbk8482b0s642nyp0c2sm068vx5wd4sjpcg"; -}; -linux_py_35_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.13.1-cp35-cp35m-linux_x86_64.whl"; - sha256 = "0b27swk4c2vaimwzbzl4c7xnccr9cfak5a3848lfqlcavcmbp94j"; -}; -linux_py_36_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.13.1-cp36-cp36m-linux_x86_64.whl"; - sha256 = "087jwjby3bym09z55cjhc587aasf01y6l009p1q2vcpfq7s7ljmk"; -}; -linux_py_37_cpu = { - url = "https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.13.1-cp37-cp37m-linux_x86_64.whl"; - sha256 = "0as68dp87lh7ffcccb149km6vws15ap04604irxwz35fq9h7grxg"; -}; -linux_py_27_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.13.1-cp27-none-linux_x86_64.whl"; - sha256 = "0bf239f2bnsbqs3qh4xdql9pgbsm0zk7j8q1hg0wn0wrq440n0ds"; -}; -linux_py_35_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.13.1-cp35-cp35m-linux_x86_64.whl"; - sha256 = "1cqav22a8yz6fzk46z6kv1ha2i28h5wccbd7k66drrfxibmb93j0"; -}; -linux_py_36_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.13.1-cp36-cp36m-linux_x86_64.whl"; - sha256 = "1xnbiz36z7nicqrv0cmymfnwb8mdz2hifcv71gh6gnyi1962f2d7"; -}; -linux_py_37_gpu = { - url = "https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.13.1-cp37-cp37m-linux_x86_64.whl"; - sha256 = "10gcrmd9y5a89wpi4rpp9scc9l2krijv8yjp7iphlykmn54ps74k"; -}; -mac_py_2_cpu = { - url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.13.1-py2-none-any.whl"; - sha256 = "1a6y5xj2wqkd8qmabn2xjg3q7x2jfixwrz351dgcxlhy8qy5yc0g"; -}; -mac_py_3_cpu = { - url = "https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.13.1-py3-none-any.whl"; - sha256 = "1klsv18k0isfd61z1wirfz1lnqmx8k73ga8g9s18yand65iycads"; -}; -} diff --git a/pkgs/development/python-modules/tensorflow/tf1.14.0-hashes.nix b/pkgs/development/python-modules/tensorflow/tf1.14.0-hashes.nix new file mode 100644 index 000000000000..f6b367aea383 --- /dev/null +++ b/pkgs/development/python-modules/tensorflow/tf1.14.0-hashes.nix @@ -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"; +}; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c06cf060d6e0..e957fe5746c5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -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 { };