google-research / scenic

Scenic: A Jax Library for Computer Vision Research and Beyond
Apache License 2.0
3.26k stars 428 forks source link

AttributeError: module 'flax.config' has no attribute 'update' #828

Open ee2110 opened 1 year ago

ee2110 commented 1 year ago

Hi, as mentioned in the documentation on vid2seq

Note that because this project relies on Scenic train_lib_deprecated, you need to downgrade your version of Flax to 0.5 for compatibility.

I have done pip install flax==0.5 before pip install -r scenic/projects/vid2seq/requirements.txt However, I get this:

Requirement already satisfied: cached_property in /home/yeokeat/anaconda3/envs/goal/lib/python3.8/site-packages (from t5x->-r scenic/projects/vid2seq/requirements.txt (line 4)) (1.5.2)
INFO: pip is looking at multiple versions of t5x to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install flax==0.5 and t5x==0.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested flax==0.5
    t5x 0.0.0 depends on flax 0.6.11 (from git+https://github.com/google/flax#egg=flax)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Then, I got some other errors example as below when try to do training with YouCook, but I not sure if related to above. AttributeError: module 'flax.config' has no attribute 'update'

Is anyone able to run this training? Could you help to share your solution if you have solved it? Thank you!

ee2110 commented 1 year ago

I truly appreciate it if someone or the author could advise the implementation with more clear instructions, I was stuck when trying to run the vid2seq due to encountering many installation issues.

kerenganon commented 1 year ago

I changed the flax version to 0.7 in scenic/projects/vid2seq/requirements.txt and installation worked. I didn't try training though, so I don't know if the change has any effect on that.