N3PDF / pdfflow

PDFflow is parton distribution function interpolation library written in Python and based on the TensorFlow framework.
https://pdfflow.readthedocs.io
Apache License 2.0
8 stars 0 forks source link

Dependency issue #24

Closed alecandido closed 4 years ago

alecandido commented 4 years ago

Seems like one of the dependency your dependencies has been updated in a non-backward compatible way, namely cloudpickle through tensorflow_probability.

Traceback
ImportError while importing test module '/home/alessandro/projects/N3PDF/pdfflow/src/pdfflow/tests/test_pflow.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:   
src/pdfflow/tests/test_pflow.py:6: in 
    from pdfflow.pflow import mkPDF
src/pdfflow/pflow.py:18: in 
    from pdfflow.subgrid import Subgrid
src/pdfflow/subgrid.py:12: in 
    from pdfflow.functions import inner_subgrid
src/pdfflow/functions.py:32: in 
    from pdfflow.region_interpolator import interpolate                                                                                                                                                                                                                    
src/pdfflow/region_interpolator.py:7: in 
    from pdfflow.neighbour_knots import four_neighbour_knots
src/pdfflow/neighbour_knots.py:7: in                                                                                                                                                                                                                               
    import tensorflow_probability as tfp                                                                                                                                                                                                                                   
env/lib/python3.8/site-packages/tensorflow_probability/__init__.py:76: in 
    from tensorflow_probability.python import *  # pylint: disable=wildcard-import
env/lib/python3.8/site-packages/tensorflow_probability/python/__init__.py:23: in 
    from tensorflow_probability.python import distributions
env/lib/python3.8/site-packages/tensorflow_probability/python/distributions/__init__.py:88: in 
    from tensorflow_probability.python.distributions.pixel_cnn import PixelCNN
env/lib/python3.8/site-packages/tensorflow_probability/python/distributions/pixel_cnn.py:37: in 
    from tensorflow_probability.python.layers import weight_norm
env/lib/python3.8/site-packages/tensorflow_probability/python/layers/__init__.py:31: in 
    from tensorflow_probability.python.layers.distribution_layer import CategoricalMixtureOfOneHotCategorical
env/lib/python3.8/site-packages/tensorflow_probability/python/layers/distribution_layer.py:28: in 
    from cloudpickle.cloudpickle import CloudPickler
    ImportError: cannot import name 'CloudPickler' from 'cloudpickle.cloudpickle' (/home/alessandro/projects/N3PDF/pdfflow/env/lib/python3.8/site-packages/cloudpickle/cloudpickle.py)

It seems to me to have made all the required checks, and I really hope not to be my personal fault, but there is still this chance.

However, for the sake of reporting:

Maybe the minimal thing I would suggest is to specify on setup.py the restrictions on the version you are using. If you need any more info from my side let me know.

alecandido commented 4 years ago

Looking at your workflows maybe it is a python 3.8 issue, I will retry with 3.7 and report back.

scarlehoff commented 4 years ago

Yeah, this happened two days ago with the latest release of cloudpickle https://github.com/cloudpipe/cloudpickle/issues/390 and it is a tensorflow-probability issue https://github.com/tensorflow/probability/issues/991 which they will have to deal with.

For now the workaround is to install cloudpickle==1.4. Given that both cloudpickle and tf-prob know about it I guess it will be fixed soonish.

scarlehoff commented 4 years ago

This seems to have been fixed now https://github.com/tensorflow/probability/releases/tag/v0.10.1