Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

cannot use python 3.9 with tensorflow==1.15 #47

Open
mschrimpf opened this issue Jan 30, 2021 · 10 comments
Open

cannot use python 3.9 with tensorflow==1.15 #47

mschrimpf opened this issue Jan 30, 2021 · 10 comments

Comments

@mschrimpf
Copy link
Member

We're currently still on TensorFlow 1:

"tensorflow==1.15",

Python 3.9 so far does not seem to work with 1.15, we should upgrade to TensorFlow 2 to avoid specifying versions directly

@raj-magesh
Copy link

Is there a timeline for this upgrade? I need some TensorFlow 2 functionality that I can't easily access in the same environment because model-tools forces TensorFlow 1.15.

@mschrimpf
Copy link
Member Author

So far, we did not have this planned until mid 2022, but if there's a necessity we will prioritize it sooner.

Can you please describe your use case? Is there a way to get away with tf1 and e.g. re-defining the functionality you're using?

@martinosorb
Copy link

For what is tensorflow used in the library? I had the same problem and I simply told pip to ignore the tensorflow dependency while installing model-tools. The tests seem to work. Of course it may be needed for other things which I'm not currently using...

@mschrimpf
Copy link
Member Author

It's actually only used in the OST metric which isn't included in the competition (as well as the mask_regression metric which currently isn't used at all for the standard benchmarks).
Did you already submit? It might be that the model fails on the Kar2019-ost benchmark but should work on the others.

@raj-magesh
Copy link

Sorry for the late reply! I needed a TF2 utility to convert pretrained TF models to PyTorch. I decided to just create a separate environment for that step of my workflow, so this isn't urgent. Closing the issue; thanks for the responses!

@YudiXie
Copy link

YudiXie commented May 15, 2023

I got an issue related to this when installing this repo on a MacBook with Apple Silicon. It seems that the issue originated from the fact that this package only uses tensorflow==1.15, which is not compatible with Python 3.8 or higher.

However, the newer Anaconda distribution for the M1 MacOS system only has Python 3.8 and higher, making it hard to run this repo on the laptop. So to install this package, I may have to reinstall Anaconda or switch to another machine that supports Python 3.7.

It would be really great if this repo could support newer versions of TensorFlow and Python.

@nikparth
Copy link

to add to this, there are a lot of models these days that only have weights in TF2. Unless there is an easy way to convert these to previous TF versions or pytorch (which I haven't seen a general way to do), this limits the models that can be evaluated.

@IanCarrasco
Copy link

IanCarrasco commented Sep 24, 2023

Any updates on this dependency? I've been interested in getting this up and running and have gone through various python versions/venvs with no luck. Thank you!

@IanCarrasco
Copy link

IanCarrasco commented Sep 24, 2023

It appears that this PR updated the two files in question to use TF2 (brain-score/vision@04b01f5), but it may just be an old dependency in model-tools? If those were the last two TF1 references.

Potentially Old Dependency in Question:
https://github.com/brain-score/model-tools/blob/master/setup.py#L18C5-L18C24

@mschrimpf
Copy link
Member Author

hi all, as an update to this: we have just released a major refactor which combines model-tools and models into brain-score: https://github.com/brain-score/vision

This should make it a lot easier to fix the tensorflow issues and potentially upgrade python.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants