Skip to content

Update backend import in JAX speedup notebook#1

Open
jimangel wants to merge 1 commit intoche-shr-cat:mainfrom
jimangel:patch-1
Open

Update backend import in JAX speedup notebook#1
jimangel wants to merge 1 commit intoche-shr-cat:mainfrom
jimangel:patch-1

Conversation

@jimangel
Copy link

Fixes:

/tmp/ipykernel_1997/1991717721.py:1: DeprecationWarning: jax.lib.xla_bridge module will be removed in JAX v0.9.0; all its APIs were deprecated and removed by JAX v0.8.0.
  from jax.lib import xla_bridge
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[3], line 2
      1 from jax.lib import xla_bridge
----> 2 print(xla_bridge.get_backend().platform)

File ~/notebooks/.venv/lib/python3.12/site-packages/jax/_src/deprecations.py:54, in deprecation_getattr.<locals>.getattr(name)
     52 message, fn = deprecations[name]
     53 if fn is None:  # Is the deprecation accelerated?
---> 54   raise AttributeError(message)
     55 warnings.warn(message, DeprecationWarning, stacklevel=2)
     56 return fn

AttributeError: jax.lib.xla_bridge.get_backend is deprecated and will be removed in JAX v0.8.0; use jax.extend.backend.get_backend, and please note that you must `import jax.extend` explicitly.

Fixes:

```
/tmp/ipykernel_1997/1991717721.py:1: DeprecationWarning: jax.lib.xla_bridge module will be removed in JAX v0.9.0; all its APIs were deprecated and removed by JAX v0.8.0.
  from jax.lib import xla_bridge
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[3], line 2
      1 from jax.lib import xla_bridge
----> 2 print(xla_bridge.get_backend().platform)

File ~/notebooks/.venv/lib/python3.12/site-packages/jax/_src/deprecations.py:54, in deprecation_getattr.<locals>.getattr(name)
     52 message, fn = deprecations[name]
     53 if fn is None:  # Is the deprecation accelerated?
---> 54   raise AttributeError(message)
     55 warnings.warn(message, DeprecationWarning, stacklevel=2)
     56 return fn

AttributeError: jax.lib.xla_bridge.get_backend is deprecated and will be removed in JAX v0.8.0; use jax.extend.backend.get_backend, and please note that you must `import jax.extend` explicitly.
```
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

Successfully merging this pull request may close these issues.

1 participant