Code Monkey home page Code Monkey logo

Comments (7)

welcomethebird avatar welcomethebird commented on June 16, 2024 3

It looks like there is a runtime error related to the JAX library. The error message indicates that the version of JAX you have is not compatible with the version required by your code. Quickly Check Google's cloud library version & JAX version requirements.

from graphcast.

scploeger avatar scploeger commented on June 16, 2024 1

I was above to temporarily get past this issue by downgrading the following packages:

!pip install jax==0.4.16
!pip install jaxlib==0.4.16
!pip install flax==0.7.3

from graphcast.

scploeger avatar scploeger commented on June 16, 2024

I had this issue too. I tried updgrading jax to a version >= 0.4.14 with !pip install jaxlib==0.4.14, but this line
from graphcast import casting
still causes the following error:

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

<ipython-input-3-08ed8f8071bd> in <cell line: 13>()
     11 from google.cloud import storage
     12 from graphcast import autoregressive
---> 13 from graphcast import casting
     14 from graphcast import checkpoint
     15 from graphcast import data_utils

4 frames

/usr/local/lib/python3.10/dist-packages/graphcast/casting.py in <module>
     17 from typing import Any, Mapping, Tuple
     18 
---> 19 import chex
     20 from graphcast import predictor_base
     21 import haiku as hk

/usr/local/lib/python3.10/dist-packages/chex/__init__.py in <module>
     15 """Chex: Testing made fun, in JAX!"""
     16 
---> 17 from chex._src.asserts import assert_axis_dimension
     18 from chex._src.asserts import assert_axis_dimension_comparator
     19 from chex._src.asserts import assert_axis_dimension_gt

/usr/local/lib/python3.10/dist-packages/chex/_src/asserts.py in <module>
     24 from unittest import mock
     25 
---> 26 from chex._src import asserts_internal as _ai
     27 from chex._src import pytypes
     28 import jax

/usr/local/lib/python3.10/dist-packages/chex/_src/asserts_internal.py in <module>
     32 
     33 from absl import logging
---> 34 from chex._src import pytypes
     35 import jax
     36 from jax.experimental import checkify

/usr/local/lib/python3.10/dist-packages/chex/_src/pytypes.py in <module>
     23 ArrayBatched = jax.interpreters.batching.BatchTracer
     24 ArrayNumpy = np.ndarray
---> 25 ArraySharded = jax.interpreters.pxla.ShardedDeviceArray
     26 # For instance checking, use `isinstance(x, jax.Array)`.
     27 if hasattr(jax, 'Array'):

AttributeError: module 'jax.interpreters.pxla' has no attribute 'ShardedDeviceArray'


from graphcast.

scploeger avatar scploeger commented on June 16, 2024

!pip install jax==0.4.16
!pip install jaxlib==0.4.16
!pip install flax==0.7.3

@Shadowwomen see my reply above. I was able to make it work as intended by downgrading the packages to these versions after the original versions were installed.

from graphcast.

tenhoeve13 avatar tenhoeve13 commented on June 16, 2024

I'm still getting the error:

AttributeError: module 'jax.interpreters.pxla' has no attribute 'ShardedDeviceArray'

after trying the fix from @scploeger. Any help would be appreciated.

from graphcast.

tvonich avatar tvonich commented on June 16, 2024

I was above to temporarily get past this issue by downgrading the following packages:

!pip install jax==0.4.16
!pip install jaxlib==0.4.16
!pip install flax==0.7.3

This worked for me also. I only needed to downgrade jax and jaxlib

from graphcast.

andrewlkd avatar andrewlkd commented on June 16, 2024

The version of chex being pointed to is deprecated.

Running

!pip install --upgrade jaxlib
!pip install --upgrade chex

should fix these issues.

Hope this helps!

from graphcast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.