Skip to content

Commit

Permalink
Recommend 'tensorflow-probability[tf]' extra on tf-keras import failure
Browse files Browse the repository at this point in the history
* In addition to recommending users install TensorFlow dependencies piecemeal, also
  recommend using the 'tf' extra to install all required dependencies to use
  tensorflow-probability with tensorflow.
* Split this off from the rest of the error message as it is already too long.
  • Loading branch information
matthewfeickert committed Mar 10, 2024
1 parent 988f023 commit b3a621d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tensorflow_probability/python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def _validate_tf_environment(package):
'installed by default when you install TensorFlow Probability. '
'This is so that JAX-only users do not have to install TensorFlow '
'or TF-Keras. To use TensorFlow Probability with TensorFlow, '
'please install the tf-keras or tf-keras-nightly package.\n\n')
'please install the tf-keras or tf-keras-nightly package.\n'
'This can be be done through the tensorflow-probability[tf] extra.\n\n')
raise


Expand Down

0 comments on commit b3a621d

Please sign in to comment.