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

Apply mlagility to create ONNX model in CI #605

Merged
merged 57 commits into from
Jun 20, 2023

Conversation

jcwchen
Copy link
Member

@jcwchen jcwchen commented Apr 27, 2023

Description

  • Apply mlagility to create ONNX model in CI
  • TODO: upgrade several existing old ONNX models in ONNX model Zoo

Motivation
To make onnx models reproducible, apply mlagility to create ONNX model in CI.

Signed-off-by: jcwchen <jacky82226@gmail.com>
@jcwchen jcwchen added the CI label Apr 27, 2023
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
@jcwchen jcwchen marked this pull request as draft May 2, 2023 23:24
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
@jcwchen jcwchen marked this pull request as ready for review June 14, 2023 16:24
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
torchvision==0.15.1

Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
workflow_scripts/config.py Outdated Show resolved Hide resolved
- name: Install dependencies and mlagility
run: |
python -m pip install --upgrade pip
python -m pip install onnx onnxruntime requests py-cpuinfo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 36 installs both onnx and onnxruntime. Do we need a separate pip install here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you are talking about this requirements: https://github.com/groq/mlagility/blob/main/models/requirements.txt, but actually onnx and onnxruntime are not there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installation of MLAgility here installs onnx and onnxruntime

Comment on lines +1 to +2
torch==2.0.0
torchvision==0.15.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These requirements are also covered by mlagility. Do we need a separate requirements file here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, mlagility is still using torch<=1.14.0 according to https://github.com/groq/mlagility/blob/main/models/requirements.txt. ONNX needs PyTorch 2.0 here to convert opset_version 18.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MLAgility includes a setup.py that installs the base dependencies and a requirements.txt that installs additional packages for the mlagility/models.
The setup.py installs torch>=1.12.1 here which should install torch2.0.

Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
Signed-off-by: jcwchen <jacky82226@gmail.com>
@jcwchen jcwchen merged commit d0f5e56 into onnx:new-models Jun 20, 2023
6 checks passed
@jcwchen jcwchen deleted the jcw/add-mlagility branch June 20, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants