Skip to content
Snippets Groups Projects
Commit 48d31a96 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

chore : better naming of aidge_models + deletion of aidge_ files in teardown

parent 66288581
No related branches found
No related tags found
3 merge requests!63Draft: feat/operator_constantofshape,!61Learning backend cuda,!34Feat/operator squeeze unsqueeze
Pipeline #52496 passed
...@@ -26,7 +26,7 @@ class ImportExportONNXTestCases: ...@@ -26,7 +26,7 @@ class ImportExportONNXTestCases:
def download_onnx_model(url, destination): def download_onnx_model(url, destination):
if os.path.exists(destination) : if os.path.exists(destination):
return return
try: try:
response = requests.get(url, stream=True) response = requests.get(url, stream=True)
...@@ -51,17 +51,14 @@ class TestLoadSave(unittest.TestCase): ...@@ -51,17 +51,14 @@ class TestLoadSave(unittest.TestCase):
input_dims=np.array([[1, 3, 224, 224]]), input_dims=np.array([[1, 3, 224, 224]]),
output_dims=np.array([[1, 1000]]), output_dims=np.array([[1, 1000]]),
), ),
# ImportExportONNXTestCases(
# url="https://github.com/onnx/models/raw/main/validated/vision/classification/squeezenet/model/squeezenet1.1-7.onnx?download=",
# original_onnx_filename="squeezenet1.1-7.onnx",
# input_dims=np.array([[1, 3, 224, 224]]),
# output_dims=np.array([[1, 1000, 1, 1]]),
# ),
] ]
return return
def tearDown(self): def tearDown(self):
pass for test in self.test_runs:
aidge_onnx_file = "aidge_" + test.original_onnx_filename
if os.path.exists(aidge_onnx_file):
os.remove(aidge_onnx_file)
def test_import_export(self): def test_import_export(self):
Log.set_console_level(Level.Info) Log.set_console_level(Level.Info)
...@@ -71,7 +68,7 @@ class TestLoadSave(unittest.TestCase): ...@@ -71,7 +68,7 @@ class TestLoadSave(unittest.TestCase):
download_onnx_model(test.url, test.original_onnx_filename) download_onnx_model(test.url, test.original_onnx_filename)
Log.notice("\nConverting onnx model to aidge") Log.notice("\nConverting onnx model to aidge")
model = aidge_onnx.load_onnx(test.original_onnx_filename, verbose=True) model = aidge_onnx.load_onnx(test.original_onnx_filename, verbose=True)
aidge_model_onnx_filename = "aidge" + test.original_onnx_filename aidge_model_onnx_filename = "aidge_" + test.original_onnx_filename
Log.notice("\nRe exporting aidge model to onnx...") Log.notice("\nRe exporting aidge model to onnx...")
aidge_onnx.export_onnx( aidge_onnx.export_onnx(
...@@ -86,6 +83,5 @@ class TestLoadSave(unittest.TestCase): ...@@ -86,6 +83,5 @@ class TestLoadSave(unittest.TestCase):
self.assertTrue(aidge_onnx.check_onnx_validity(aidge_model_onnx_filename)) self.assertTrue(aidge_onnx.check_onnx_validity(aidge_model_onnx_filename))
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment