[TF Hub][Notebook] Secure future notebook models in the precommit (#19652)

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
This commit is contained in:
Roman Kazantsev 2023-09-06 18:43:30 +04:00 committed by GitHub
parent d9952b2455
commit 023a2f462a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,9 @@ def get_models_list(file_name: str):
models = [] models = []
with open(file_name) as f: with open(file_name) as f:
for model_info in f: for model_info in f:
# skip comment in model scope file
if model_info.startswith('#'):
continue
mark = None mark = None
reason = None reason = None
assert len(model_info.split(',')) == 2 or len(model_info.split(',')) == 4, \ assert len(model_info.split(',')) == 2 or len(model_info.split(',')) == 4, \

View File

@ -7,3 +7,9 @@ efficientnet/lite0/classification,https://tfhub.dev/tensorflow/efficientnet/lite
movenet/multipose/lightning,https://tfhub.dev/google/movenet/multipose/lightning/1?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/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 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