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

[WIP] ONNX Model Quantization #3837

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

ethanreidel
Copy link
Contributor

Code Pull Requests

Please provide the following:

  • a clear explanation of what your code does
    Expands on @saad-palapa and @skanjila implementation of the ONNX exporter. Adds ability to quantize ONNX model to uint8 weights. Be aware that this PR does add 3 new .onnx model files strictly for testing based on squeezenet architecture.
  • if applicable, a reference to an issue
    Addition to this issue: Export computer-vision model to ONNX #3659
  • a reproducible test for your PR (code, config and data sample)
    tests->ludwig->model_export->test_onnx_exporter.py (tests->ludwig->model_export->sampleonnxmodel contains test onnx models)

Other issues:
Currently test_quantize_onnx_model is passing but with a lot of warnings.
Quantization parameters for tensor:"x" not specified
Quantization parameters for tensor:"/features/features.2/MaxPool_output_0" not specified
Continued...

Thanks for looking at this PR!

@ethanreidel
Copy link
Contributor Author

Noting: need to add onnxruntime to requirements

Copy link

Unit Test Results

  6 files  ±  0  6 suites  ±0   13s ⏱️ - 13m 54s
  6 tests  -   6  0 ✔️  -   9    5 💤 +2  0 ±0  1 🔥 +1 
27 runs   - 33  0 ✔️  - 42  21 💤 +3  0 ±0  6 🔥 +6 

For more details on these errors, see this check.

Results for commit fcc0abc. ± Comparison against base commit 7e8fc14.

This pull request removes 12 and adds 6 tests. Note that renamed tests count towards both.
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[adult_census_income.ecd.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[adult_census_income.gbm.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[ames_housing.ecd.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[ames_housing.gbm.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[mercedes_benz_greener.ecd.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[mercedes_benz_greener.gbm.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[sarcos.ecd.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[sarcos.gbm.yaml]
tests.regression_tests.model.test_old_models ‑ test_model_loaded_from_old_config_prediction_works
tests.regression_tests.model.test_old_models ‑ test_predict_deprecated_model[respiratory]
…
tests.ludwig.automl.test_base_config
tests.ludwig.automl.test_utils
tests.ludwig.backend.test_ray
tests.ludwig.benchmarking.test_profiler
tests.ludwig.data.test_ray_data
tests.ludwig.model_export.test_onnx_exporter
This pull request removes 3 skipped tests and adds 5 skipped tests. Note that renamed tests count towards both.
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[ames_housing.ecd.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[mercedes_benz_greener.ecd.yaml]
tests.regression_tests.benchmark.test_model_performance ‑ test_performance[sarcos.ecd.yaml]
tests.ludwig.automl.test_base_config
tests.ludwig.automl.test_utils
tests.ludwig.backend.test_ray
tests.ludwig.benchmarking.test_profiler
tests.ludwig.data.test_ray_data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant