From 30e618ff3313385a98552cbc7a1eab28a52a82a5 Mon Sep 17 00:00:00 2001 From: Yaman Umuroglu <maltanar@gmail.com> Date: Mon, 17 Aug 2020 13:15:02 +0200 Subject: [PATCH] [Test] remove/don't generate tmp files in main folder --- tests/transformation/test_absorb_transp_into_flatten.py | 4 ++-- tests/transformation/test_topk_insert.py | 4 ++-- tests/util/test_create.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/transformation/test_absorb_transp_into_flatten.py b/tests/transformation/test_absorb_transp_into_flatten.py index fbfa15277..cbbb33b46 100644 --- a/tests/transformation/test_absorb_transp_into_flatten.py +++ b/tests/transformation/test_absorb_transp_into_flatten.py @@ -57,9 +57,9 @@ def test_absorb_transp_into_flatten(perm, shape, ishape, data_layout): model = model.transform(InferDataLayouts()) model = model.transform(GiveUniqueNodeNames()) model = model.transform(GiveReadableTensorNames()) - model.save("test.onnx") + # model.save("test.onnx") model_transformed = model.transform(AbsorbTransposeIntoFlatten()) - model_transformed.save("test2.onnx") + # model_transformed.save("test2.onnx") # verify transformation inp_values = np.random.uniform(low=-1, high=1, size=tuple(ishape)).astype( diff --git a/tests/transformation/test_topk_insert.py b/tests/transformation/test_topk_insert.py index b85ed4aa6..a18e63384 100644 --- a/tests/transformation/test_topk_insert.py +++ b/tests/transformation/test_topk_insert.py @@ -1,4 +1,4 @@ -# import os +import os import onnx from finn.util.test import get_test_model_trained import brevitas.onnx as bo @@ -57,4 +57,4 @@ def test_topk_insert(k): output_pysim_topk = output_pysim_topk.astype(np.int).flatten() assert np.array_equal(output_golden_topk, output_pysim_topk) - # os.remove(export_onnx_path) + os.remove(export_onnx_path) diff --git a/tests/util/test_create.py b/tests/util/test_create.py index 7173add35..4e2369785 100644 --- a/tests/util/test_create.py +++ b/tests/util/test_create.py @@ -61,4 +61,4 @@ def test_hls_random_mlp_maker(bitwidth): ret = create.hls_random_mlp_maker(layer_spec) assert len(ret.graph.node) == 5 - ret.save("mlp-%s.onnx" % str(bitwidth)) + # ret.save("mlp-%s.onnx" % str(bitwidth)) -- GitLab