diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index adfa7420d67..2accc92cd1e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -850,8 +850,6 @@ jobs: - name: TensorFlow Hub Tests - TF FE run: | - python3 -m pip install openvino --find-links=${{ env.INSTALL_DIR }}/tools - python3 -m pip install -r ${{ env.MODEL_HUB_TESTS_INSTALL_DIR }}/tf_hub_tests/requirements.txt export PYTHONPATH=${{ env.MODEL_HUB_TESTS_INSTALL_DIR }}:$PYTHONPATH diff --git a/tests/model_hub_tests/models_hub_common/test_convert_model.py b/tests/model_hub_tests/models_hub_common/test_convert_model.py index 8a383c92252..236e340931f 100644 --- a/tests/model_hub_tests/models_hub_common/test_convert_model.py +++ b/tests/model_hub_tests/models_hub_common/test_convert_model.py @@ -7,6 +7,10 @@ from models_hub_common.multiprocessing_utils import multiprocessing_run from openvino import convert_model from openvino.runtime import Core +# set seed to have deterministic input data generation +# to avoid sporadic issues in inference results +rng = np.random.default_rng(seed=56190) + class TestConvertModel: infer_timeout = 600 @@ -19,15 +23,13 @@ class TestConvertModel: def prepare_input(self, input_shape, input_type): if input_type in [np.float32, np.float64]: - return np.random.randint(-2, 2, size=input_shape).astype(input_type) - elif input_type in [np.int8, np.int16, np.int32, np.int64]: - return np.random.randint(-5, 5, size=input_shape).astype(input_type) - elif input_type in [np.uint8, np.uint16]: - return np.random.randint(0, 5, size=input_shape).astype(input_type) + return 2.0 * rng.random(size=input_shape, dtype=input_type) + elif input_type in [np.uint8, np.uint16, np.int8, np.int16, np.int32, np.int64]: + return rng.integers(0, 5, size=input_shape).astype(input_type) elif input_type in [str]: return np.broadcast_to("Some string", input_shape) elif input_type in [bool]: - return np.random.randint(0, 2, size=input_shape).astype(input_type) + return rng.integers(0, 2, size=input_shape).astype(input_type) else: assert False, "Unsupported type {}".format(input_type) diff --git a/tests/model_hub_tests/tf_hub_tests/precommit_models b/tests/model_hub_tests/tf_hub_tests/precommit_models index 2b89ebfe5e3..90dd3f4c5e1 100644 --- a/tests/model_hub_tests/tf_hub_tests/precommit_models +++ b/tests/model_hub_tests/tf_hub_tests/precommit_models @@ -8,9 +8,10 @@ movenet/multipose/lightning,https://tfhub.dev/google/movenet/multipose/lightning imagenet/efficientnet_v2_imagenet1k_b0/feature_vector,https://tfhub.dev/google/imagenet/efficientnet_v2_imagenet1k_b0/feature_vector/2?tf-hub-format=compressed imagenet/mobilenet_v1_100_224/classification,https://tfhub.dev/google/imagenet/mobilenet_v1_100_224/classification/5?tf-hub-format=compressed,skip,119718 - Accuracy issue magenta/arbitrary-image-stylization-v1-256,https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2?tf-hub-format=compressed +small_bert/bert_en_uncased_L-4_H-256_A-4,https://tfhub.dev/tensorflow/small_bert/bert_en_uncased_L-4_H-256_A-4/2?tf-hub-format=compressed,skip,119718 - Accuracy issue # secure notebook models unet/industrial/class_1,https://tfhub.dev/nvidia/unet/industrial/class_1/1?tf-hub-format=compressed movenet/singlepose/thunder,https://tfhub.dev/google/movenet/singlepose/thunder/4?tf-hub-format=compressed esrgan-tf2,https://tfhub.dev/captain-pool/esrgan-tf2/1?tf-hub-format=compressed -film,https://tfhub.dev/google/film/1?tf-hub-format=compressed,skip,119907 - incorrect test data +film,https://tfhub.dev/google/film/1?tf-hub-format=compressed,skip,119718 - Accuracy issue planet/vision/classifier/planet_v2,https://tfhub.dev/google/planet/vision/classifier/planet_v2/1?tf-hub-format=compressed \ No newline at end of file