cloudpipe / cloudpipe/cloudpickle

cloudpickle v1.5.0 breaks TensorFlow Probability

Open
#390 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
1

Description

Hi. I'm just reporting that [`cloudpickle` `v1.5.0`](https://pypi.org/project/cloudpickle/1.5.0/) currently breaks [TensorFlow Probability `v0.10.0`](https://github.com/tensorflow/probability/releases/tag/v0.10.0) entirely. This is more of a heads up as you'll probably be getting some other reports.

This is currenlty detailed in the following Issues:
- [`pyhf` Issue 913](https://github.com/scikit-hep/pyhf/issues/913)
- [TensorFlow Probability Issue 991](https://github.com/tensorflow/probability/issues/991)

A minimal failing example is found in [`pyhf` Issue 913](https://github.com/scikit-hep/pyhf/issues/913) but also reproduced here:

```
$ python --version
Python 3.7.5
$ python -m venv ${HOME}/debug-this
$ source ${HOME}/debug-this/bin/activate
(debug-this) $ python -m pip install --upgrade pip setuptools wheel
(debug-this) $ python -m pip install tensorflow tensorflow-probability
(debug-this) $ python -c "import tensorflow_probability"
Traceback (most recent call last):
File "", line 1, in
File "/home/feickert/debug-this/lib/python3.7/site-packages/tensorflow_probability/__init__.py", line 76, in
from tensorflow_probability.python import * # pylint: disable=wildcard-import
File "/home/feickert/debug-this/lib/python3.7/site-packages/tensorflow_probability/python/__init__.py", line 23, in
from tensorflow_probability.python import distributions
File "/home/feickert/debug-this/lib/python3.7/site-packages/tensorflow_probability/python/distributions/__init__.py", line 88, in
from tensorflow_probability.python.distributions.pixel_cnn import PixelCNN
File "/home/feickert/debug-this/lib/python3.7/site-packages/tensorflow_probability/python/distributions/pixel_cnn.py", line 37, in
from tensorflow_probability.python.layers import weight_norm
File "/home/feickert/debug-this/lib/python3.7/site-packages/tensorflow_probability/python/layers/__init__.py", line 31, in
from tensorflow_probability.python.layers.distribution_layer import CategoricalMixtureOfOneHotCategorical
File "/home/feickert/debug-this/lib/python3.7/site-packages/tensorflow_probability/python/layers/distribution_layer.py", line 28, in
from cloudpickle.cloudpickle import CloudPickler
ImportError: cannot import name 'CloudPickler' from 'cloudpickle.cloudpickle' (/home/feickert/debug-this/lib/python3.7/site-packages/cloudpickle/cloudpickle.py)
(debug-this) $ pip list | grep cloudpickle
cloudpickle 1.5.0
(debug-this) $ pip list | grep tensor
tensorboard 2.2.2
tensorboard-plugin-wit 1.7.0
tensorflow 2.2.0
tensorflow-estimator 2.2.0
tensorflow-probability 0.10.0
```

This is obviously already known to the `cloudpickle` devs, but for anyone else, as can be seen above this fails because

```python
from cloudpickle.cloudpickle import CloudPickler
```
is invalid and should be ~`from cloudpickle.cloudpickle_fast import CloudPickler`~

(**edit**)
```python
from cloudpickle import CloudPickler
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.