Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issue from flax vs jax compatibility #192

Open
david2611 opened this issue Sep 27, 2023 · 4 comments
Open

Installation Issue from flax vs jax compatibility #192

david2611 opened this issue Sep 27, 2023 · 4 comments

Comments

@david2611
Copy link

Following the install instructions on the main README page caused an error seemingly due to incompatibilities between jax and flax.

Following install instructions gave jax version 0.4.16 and flax version 0.5.3

Running the example training code gave the following error ImportError: cannot import name 'ShapedArray' from 'jax'

I have not used jax or flax before but from doing some digging this seems to be because jax hasn't provided ShapedArray since version 0.4.14.

Upgrading flax to version 0.7.0 got past this problem but opened up a new issue of flax.optim no longer being a part of the flax library.

What is the recommended solution to this problem and can code/documentation be updated to reflect this compatibility issue?

@fasogbon
Copy link

Same issue here

@fasogbon
Copy link

Pleas help to solve this issue! Thank you

@fasogbon
Copy link

This worked for me using python 3.6:
pip3 install --upgrade jax==0.2.14 jaxlib==0.1.69+cuda111 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

@KaneLindsay
Copy link

I got a working Conda environment with Python 3.9, Ubuntu 20.04, CUDA Toolkit 11.8 and cuDNN 8.6 by specifying the requirement versions in jax3d/requirements.txt as:

chex
clu
einops
flax
gin-config
imageio
jax[cuda11_local] == 0.4.4
jaxlib @ https://storage.googleapis.com/jax-releases/cuda11/jaxlib-0.4.4+cuda11.cudnn86-cp39-cp39-manylinux2014_x86_64.whl
mediapy
numpy
pandas
simple_parsing
tensorflow[and-cuda]
tfds-nightly
typing_extensions
xmanager
scikit-image 

sunds @ git+https://github.com/google-research/sunds
etils[array_types,enp,epath,epy,etqdm,etree] @ git+https://github.com/google/etils

Then,

pip install flax==0.5.3
pip install --upgrade "jax3d[nesf]"

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

No branches or pull requests

3 participants