From 204bc9fe6f282e43c2bbf7f18c4de1931e1f3d27 Mon Sep 17 00:00:00 2001 From: Alexander Suslov Date: Mon, 22 Jul 2024 19:47:10 +0400 Subject: [PATCH] Reduce test_examples logs (#2828) ### Changes Follow-up #2800 ### Reason for changes Enable progress bar in the example for users ### Related tickets N/A ### Tests test examples - 458 --- .../tensorflow/mobilenet_v2/main.py | 1 - tests/cross_fw/examples/run_example.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/post_training_quantization/tensorflow/mobilenet_v2/main.py b/examples/post_training_quantization/tensorflow/mobilenet_v2/main.py index 8d95dff80df..bf4707e6dc6 100644 --- a/examples/post_training_quantization/tensorflow/mobilenet_v2/main.py +++ b/examples/post_training_quantization/tensorflow/mobilenet_v2/main.py @@ -22,7 +22,6 @@ import nncf -tfds.display_progress_bar(enable=False) ROOT = Path(__file__).parent.resolve() WEIGHTS_URL = "https://huggingface.co/alexsu52/mobilenet_v2_imagenette/resolve/main/tf_model.h5" DATASET_CLASSES = 10 diff --git a/tests/cross_fw/examples/run_example.py b/tests/cross_fw/examples/run_example.py index 385b3a4799c..dd87be4ce22 100644 --- a/tests/cross_fw/examples/run_example.py +++ b/tests/cross_fw/examples/run_example.py @@ -50,6 +50,10 @@ def post_training_quantization_openvino_mobilenet_v2_quantize() -> Dict[str, flo def post_training_quantization_tensorflow_mobilenet_v2() -> Dict[str, float]: + import tensorflow_datasets as tfds + + tfds.display_progress_bar(enable=False) + example_root = str(PROJECT_ROOT / "examples" / "post_training_quantization" / "tensorflow" / "mobilenet_v2") return post_training_quantization_mobilenet_v2(example_root)