Skip to content

Commit

Permalink
Make jax optional in testing suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Oct 15, 2024
1 parent 7815e5b commit 5aa9544
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ lines-between-types = 1
[tool.ruff.lint.per-file-ignores]
'tests/*.py' = [
'F841', # Unused variable warning for test files -- common in pymc model declarations
'D106' # Missing docstring for public method -- unittest test subclasses don't need docstrings
'D106', # Missing docstring for public method -- unittest test subclasses don't need docstrings
'E402' # Import at top, not respected when pytest.importorskip is required
]
'tests/statespace/*.py' = [
'F401', # Unused import warning for test files -- this check removes imports of fixtures
Expand Down
4 changes: 3 additions & 1 deletion tests/test_blackjax_smc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import jax
import numpy as np
import pymc as pm
import pytensor.tensor as pt
Expand All @@ -21,6 +20,9 @@
from numpy import dtype
from xarray.core.utils import Frozen

jax = pytest.importorskip("jax")
pytest.importorskip("blackjax")

from pymc_experimental.inference.smc.sampling import (
arviz_from_particles,
blackjax_particles_from_pymc_population,
Expand Down

0 comments on commit 5aa9544

Please sign in to comment.