logo
Browse Source

update

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
e051d859f1
  1. 6
      test_onnx.py
  2. 6
      test_torchscript.py

6
test_onnx.py

@ -15,7 +15,7 @@ for name in models:
except Exception as e: except Exception as e:
line += 'fail\n' line += 'fail\n'
f.write(line) f.write(line)
print(f'Fail to load op for {name}: {e}.')
print(f'Fail to load op for {name}: {e}')
continue continue
try: try:
op.save_model(format='onnx') op.save_model(format='onnx')
@ -23,7 +23,7 @@ for name in models:
except Exception as e: except Exception as e:
line += 'fail\n' line += 'fail\n'
f.write(line) f.write(line)
print(f'Fail to save onnx for {name}: {e}.')
print(f'Fail to save onnx for {name}: {e}')
continue continue
try: try:
saved_name = name.replace('/', '-') saved_name = name.replace('/', '-')
@ -33,7 +33,7 @@ for name in models:
except Exception as e: except Exception as e:
line += 'fail\n' line += 'fail\n'
f.write(line) f.write(line)
print(f'Fail to check onnx for {name}: {e}.')
print(f'Fail to check onnx for {name}: {e}')
continue continue
line += '\n' line += '\n'
f.write(line) f.write(line)

6
test_torchscript.py

@ -15,7 +15,7 @@ for name in models:
except Exception as e: except Exception as e:
line += 'fail\n' line += 'fail\n'
f.write(line) f.write(line)
print(f'Fail to load op for {name}: {e}.')
print(f'Fail to load op for {name}: {e}')
continue continue
try: try:
op.save_model(format='torchscript') op.save_model(format='torchscript')
@ -23,7 +23,7 @@ for name in models:
except Exception as e: except Exception as e:
line += 'fail\n' line += 'fail\n'
f.write(line) f.write(line)
print(f'Fail to save onnx for {name}: {e}.')
print(f'Fail to save onnx for {name}: {e}')
continue continue
try: try:
saved_name = name.replace('/', '-') saved_name = name.replace('/', '-')
@ -34,7 +34,7 @@ for name in models:
except Exception as e: except Exception as e:
line += 'fail\n' line += 'fail\n'
f.write(line) f.write(line)
print(f'Fail to check onnx for {name}: {e}.')
print(f'Fail to check onnx for {name}: {e}')
continue continue
line += '\n' line += '\n'
f.write(line) f.write(line)

Loading…
Cancel
Save