The first line of this test is currenty to import jax:
|
import jax |
|
import numpy as np |
|
import pytest |
|
import torch |
|
from test_config import DEVICES |
|
|
|
import torchsparsegradutils as tsgu |
|
import torchsparsegradutils.jax as tsgujax |
|
|
|
# skip if JAX unavailable |
|
pytest.importorskip("jax") |
|
if not tsgujax.have_jax: |
|
pytest.skip("JAX bindings unavailable, skipping jax tests", allow_module_level=True) |
|
|
|
import jax.numpy as jnp |
The import should be moved to after checking if jax is available.
The first line of this test is currenty to
import jax:torchsparsegradutils/torchsparsegradutils/tests/test_jax_bindings.py
Lines 1 to 15 in 3e13b3a
The import should be moved to after checking if jax is available.