Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[JAX FE] Update JAX version to latest one for testing (#26100)

Roman Kazantsev8274132f0795
diff --git a/tests/constraints.txt b/tests/constraints.txt
index bde21bfe43b..72d2528c88a 100644
--- a/tests/constraints.txt
+++ b/tests/constraints.txt
@@ -22,8 +22,8 @@ pytest>=5.0,<8.4
pytest-dependency==0.5.1
pytest-html==4.1.1
pytest-timeout==2.2.0
-jax<=0.4.14
-jaxlib<=0.4.14
+jax<=0.4.31
+jaxlib<=0.4.31
kornia==0.7.0
networkx<=3.3
timm==1.0.8
diff --git a/tests/layer_tests/jax_tests/jax_layer_test_class.py b/tests/layer_tests/jax_tests/jax_layer_test_class.py
index 7fdea94b62c..28e53f67e79 100644
--- a/tests/layer_tests/jax_tests/jax_layer_test_class.py
+++ b/tests/layer_tests/jax_tests/jax_layer_test_class.py
@@ -6,7 +6,6 @@ import numpy as np
import os
from common.constants import test_device, test_precision
from copy import deepcopy
-from jax import numpy as jnp
from openvino.runtime import Core
@@ -126,8 +125,12 @@ class JaxLayerTest:
input_type = _input.dtype
function_signature.append(tf.TensorSpec(input_shape, input_type))
- f = tf.function(jax2tf.convert(model), autograph=False,
- input_signature=function_signature)
+ f = tf.function(jax2tf.convert(model,
+ # request JAX to be lowered with one TensorFlow op for each JAX primitive
+ # avoid JAX compilation into StableHLO representation wrapped in XlaCallModule
+ # in early JAX version native_serialization was default but not now
+ native_serialization=False),
+ autograph=False, input_signature=function_signature)
converted_model = convert_model(f)
return converted_model