An attribute Error raised when importing tensorflow_federated on colab though I did install it.
!pip install --quiet --upgrade tensorflow-federated
import tensorflow as tf
import tensorflow_federated as tff
--> import tensorflow_federated as tff : AttributeError: module 'numpy' has no attribute '_no_nep50_warning'
how can I solve it? Thank you!
!pip install --quiet --upgrade tensorflow-federated
import tensorflow as tf
import tensorflow_federated as tff
The error you're seeing,
which mentions "module 'numpy' has no attribute '_no_nep50_warning'," is likely due to a compatibility issue between the versions of NumPy and TensorFlow Federated (TFF). To resolve this, you can follow a few steps.
1.Update the Numpy (Make sure you have the latest version of NumPy installed)
2.Reinstall TensorFlow Federated:
3.Import TensorFlow Federated:
You can refer to the gist as given:- here