Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor onnxslim test and fix bugs #51

Merged
merged 12 commits into from
Nov 28, 2024
Merged

Conversation

whyb
Copy link
Contributor

@whyb whyb commented Nov 26, 2024

Closes #42

Added OnnxSlim command test.

  • Test the basic functionality of the slim function
  • Test the modification of input shapes.
  • Test the conversion of an ONNX model from FP32 to FP16 precision.
  • Test the conversion of an ONNX model from FP16 to FP32 precision.

@inisis
Copy link
Owner

inisis commented Nov 26, 2024

Good Job!

@inisis inisis self-assigned this Nov 26, 2024
@inisis inisis self-requested a review November 26, 2024 21:37
@inisis inisis added the bug Something isn't working label Nov 26, 2024
@whyb
Copy link
Contributor Author

whyb commented Nov 27, 2024

@inisis

Could not merge this pr to main branch, Because CI test failed.

Test command:

onnxslim --input-shapes input:1,3,224,224 "/data/modelzoo/resnet18/resnet18.onnx" "/tmp/tmpj1kh/resnet18_fp16.onnx"

Failed message:

 =========================== short test summary info ============================
FAILED tests/test_onnxslim.py::TestFunctional::test_input_shape_modification - assert 2 == 0
 +  where 2 = CompletedProcess(args='onnxslim --input-shapes input:1,3,224,224 "/data/modelzoo/resnet18/resnet18.onnx" "/tmp/tmpj1kh...-v]\n                input_model [output_model]\nonnxslim: error: the following arguments are required: input_model\n').returncode
FAILED tests/test_onnxslim.py::TestFunctional::test_fp322fp16_conversion - FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpgmnl41ah/resnet18_fp16.onnx'
================== 2 failed, 5 passed, 107 warnings in 10.90s ==================

tests/test_onnxslim.py Outdated Show resolved Hide resolved
inisis
inisis previously approved these changes Nov 27, 2024
@inisis inisis changed the title Added onnxslim command test. input shapes/FP32 to FP16 refactor onnxslim test and fix bugs Nov 27, 2024
@inisis inisis self-requested a review November 28, 2024 00:27
@inisis inisis merged commit 987fab1 into inisis:main Nov 28, 2024
@inisis
Copy link
Owner

inisis commented Nov 28, 2024

@whyb Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Add tests for bash execution
3 participants