From 023a2f462aae44c2985131c213e9c99f64ac0059 Mon Sep 17 00:00:00 2001 From: Roman Kazantsev Date: Wed, 6 Sep 2023 18:43:30 +0400 Subject: [PATCH] [TF Hub][Notebook] Secure future notebook models in the precommit (#19652) Signed-off-by: Kazantsev, Roman --- tests/model_hub_tests/models_hub_common/utils.py | 3 +++ tests/model_hub_tests/tf_hub_tests/precommit_models | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/model_hub_tests/models_hub_common/utils.py b/tests/model_hub_tests/models_hub_common/utils.py index 3c4d16402de..6e8e9b7ea66 100644 --- a/tests/model_hub_tests/models_hub_common/utils.py +++ b/tests/model_hub_tests/models_hub_common/utils.py @@ -10,6 +10,9 @@ def get_models_list(file_name: str): models = [] with open(file_name) as f: for model_info in f: + # skip comment in model scope file + if model_info.startswith('#'): + continue mark = None reason = None assert len(model_info.split(',')) == 2 or len(model_info.split(',')) == 4, \ diff --git a/tests/model_hub_tests/tf_hub_tests/precommit_models b/tests/model_hub_tests/tf_hub_tests/precommit_models index 63fbdbb63bb..7b663b5046d 100644 --- a/tests/model_hub_tests/tf_hub_tests/precommit_models +++ b/tests/model_hub_tests/tf_hub_tests/precommit_models @@ -6,4 +6,10 @@ imagenet/mobilenet_v2_100_224/feature_vector,https://tfhub.dev/google/imagenet/m efficientnet/lite0/classification,https://tfhub.dev/tensorflow/efficientnet/lite0/classification/2?tf-hub-format=compressed movenet/multipose/lightning,https://tfhub.dev/google/movenet/multipose/lightning/1?tf-hub-format=compressed 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 \ No newline at end of file +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 +# 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 +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