probability
probability copied to clipboard
Hidden requirement of tensorflow version should use extras_require
I'm noticing issues very time we update the requirement of tensoflow for this check:
https://github.com/tensorflow/probability/blob/40b18076b53d7c6e22e1fa5f95d805be0cfa0cc1/tensorflow_probability/python/init.py#L52-L64
It would be nice if we could add an option to extras_require
so that it was more like:
extras_require={ # e.g. `pip install tfp-nightly[jax]`
'jax': ['jax', 'jaxlib'],
'tfds': [TFDS_PACKAGE],
'tf': ['tensorflow>=2.8'], # <--- Add a tf option here
'tf_gpu': ['tensorflow-gpu>=2.8'], # <--- Add a tf_gpu option here
}
This way if somebody is using both tensorflow and tensorflow_privacy, they can put:
# requirements.txt
tensorflow >= 2.6
tensorflow_privacy[tf]
and there will be no package conflicts after install.
Relevant: https://github.com/tensorflow/tensorflow/issues/7166
The problem is that tensorflow offers both "tensorflow" and "tensorflow-gpu" packages, and we can work with either. I suppose might be open to a PR adding "tf" and "tf-gpu" or something along those lines -- but then we will need to distinguish between tensorflow/tensorflow-gpu and tf-nightly/tf-nightly-gpu for TFP releases vs nightlies.
Brian Patton | Software Engineer | @.***
On Thu, Nov 18, 2021 at 12:16 PM Simon Swan @.***> wrote:
I'm noticing issues very time we update the requirement of tensoflow for this check:
https://github.com/tensorflow/probability/blob/40b18076b53d7c6e22e1fa5f95d805be0cfa0cc1/tensorflow_probability/python/init.py#L52-L64
It would be nice if we could add an option to extras_require so that it was more like:
extras_require={ # e.g.
pip install tfp-nightly[jax]
'jax': ['jax', 'jaxlib'], 'tfds': [TFDS_PACKAGE], 'tf': ['tensorflow>=2.8'], # <--- Add a tf option here }This way if somebody is using both tensorflow and tensorflow_privacy, they can put:
requirements.txt
tensorflow >= 2.6 tensorflow_privacy[tf]
and there will be no package conflicts after install.
Relevant: tensorflow/tensorflow#7166 https://github.com/tensorflow/tensorflow/issues/7166
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tensorflow/probability/issues/1468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJFSI6AVDDKDVXKRZUMPC3UMUYGBANCNFSM5IKEYPNQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Note that now we also have tensorflow-macos
and tensorflow-aarch64
to add more fun to the game.