diff --git a/aidge_export_cpp/unit_tests/test_examples.py b/aidge_export_cpp/unit_tests/test_examples.py index 1ddf6590acf26b0a4f5e31b43900176551c77a7f..dbd336bb054f08f6dd0d140df2706d5a25e776df 100644 --- a/aidge_export_cpp/unit_tests/test_examples.py +++ b/aidge_export_cpp/unit_tests/test_examples.py @@ -9,8 +9,10 @@ EXAMPLES_DIR = CURRENT_DIR / "../../examples" # Dictionary of test cases: {id: (script_name, script_args)} TEST_CASES = { - "lenet-int8-no-args": ("export_LeNet/lenet.py", []), - "resnet18-int8-no-args": ("export_ResNet18/resnet18.py", ["--mock_db"]) + "lenet-no-args": ("export_LeNet/lenet.py", []), + "lenet-int8": ("export_LeNet/lenet.py", ["--dtype=int8"]), + "resnet18-no-args": ("export_ResNet18/resnet18.py", ["--mock_db"]), + "resnet18-int8": ("export_ResNet18/resnet18.py", ["--mock_db", "--dtype=int8"]) } def generate_test_cases(): @@ -30,7 +32,7 @@ def test_example_scripts_run_without_error(script_name, script_args): capture_output=True, text=True ) - assert result.returncode == 0, f"{script_name} failed with error: {result.stderr}" + assert result.returncode == 0, f"{script_name} failed with error:\n{result.stderr}\n\t======\n\tstdout\n\t======\n{result.stdout}" def main(): diff --git a/examples/export_ResNet18/resnet18.py b/examples/export_ResNet18/resnet18.py index 81e335567194a83794bd4be8c2dcbd8056fa3ebf..ecc2763da93e7dc4307a29f831747fb05423a054 100644 --- a/examples/export_ResNet18/resnet18.py +++ b/examples/export_ResNet18/resnet18.py @@ -274,7 +274,8 @@ Load the .onnx model and perform some usual graph modifications : # Define the target path and filename file_url = "https://huggingface.co/EclipseAidge/resnet18/resolve/main/resnet18_imagenet_1k.onnx?download=true" file_path = Path(MODEL_NAME + "_imagenet_1k.onnx") - +dir(aidge_core.utils) +aidge_core.show_version() aidge_core.utils.download_file(file_path, file_url) model = aidge_onnx.load_onnx(file_path, verbose=False)