Skip to content
Snippets Groups Projects
Commit 5711b578 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Util] do test checkpoint load/skip differently

parent 1ead5e0a
No related branches found
No related tags found
No related merge requests found
......@@ -88,10 +88,10 @@ def soft_verify_topk(invec, idxvec, k):
def load_test_checkpoint_or_skip(filename):
"Try to load given .onnx and return ModelWrapper, else skip current test."
try:
if os.path.isfile(filename):
model = ModelWrapper(filename)
return model
except FileNotFoundError:
else:
warnings.warn(filename + " not found from previous test step, skipping")
pytest.skip(filename + " not found from previous test step, skipping")
......
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