question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tensorflow requirement issue

See original GitHub issue

When I import alibi_detect, I get the following error:

AttributeError: module 'tensorflow_core.keras.activations' has no attribute 'swish'

which is related to this issue: https://github.com/huggingface/transformers/issues/7333

They say to update to TensorFlow 2.2, but tf 2.2 requires at least Python 3.7.

So alibi-detect is basically not compatible with Python 3.6.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
candalfigomorocommented, Nov 25, 2021

@ascillitoe Yes.

As a side note, I had the need to use alibi-detect with tensorflow 2.1 (because of other constraints). Since the latest transformers version that works with tf 2.1 is transformers 3.1.0, I “downgraded” the alibi-detect requirement for transformers (>=4.0.0) to also accept transformers version 3.1.0. I don’t know if everything works correctly, but at least I’m able to load alibi-detect and use the TabularDrift class (which doesn’t rely on tensorflow/transformers).

0reactions
ascillitoecommented, Dec 7, 2021

@candalfigomoro after running some tests with the tensorflow_probablity and tensorflow versions you mentioned (e.g. 0.12 and 2.0.0), it looks to me like tensorflow_probability raises quite a descriptive ImportError, so I’m not sure we would add much by raising our own errors on top of this. We think it would be undesirable to move to tensorflow>=2.4 at this point, as it is still relatively new and lots of users might still be on older tensorflow/tensorflow_probability versions.

Hopefully in the future the tensorflow version will be specified by tensorflow_probability and this issue will be circumvented entirely 🤞🏻

I’ll close this issue now, but please do feel free to reopen if you think it still isn’t resolved!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build and install error messages - TensorFlow
The following list links error messages to a solution or discussion. If you find an installation or build problem that is not listed,...
Read more >
Tensorflow GPU Installation Requirement Issues #26382
I end up with the following messages: tensorflow 1.12.0 has requirement tensorboard<1.13.0,>=1.12.0, but you'll have tensorboard 1.13.1 ...
Read more >
Installing TensorFlow on Windows · tfdocs - branyang
Requirements to run TensorFlow with GPU support ... Issue the appropriate command to install TensorFlow inside your conda environment.
Read more >
How to install Tensorflow on the Apple M1 Notebook
python -m pip install tensorflow-macos will run Python 2 and ask it to install tensorflow which is why you're getting the error that...
Read more >
How to resolve compatibility issues for Tensorflow and ...
1 in /pfs/data5/software_uc2/bwhpc/common/jupyter/tensorflow/2022-01-11/lib/python3.8/site-packages (from matplotlib->-r requirements.txt (line ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found