-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add ONNX model hub python client #3663
Conversation
This pull request introduces 1 alert when merging dae42a1 into c24cd42 - view on LGTM.com new alerts:
|
c2e196f
to
d545a05
Compare
This pull request introduces 1 alert when merging d545a05 into c24cd42 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. However, I don't think it's a good idea to add this kind of tool into ONNX repo. Instead, it may be added into onnx/model or onnx/tools (if it's there).
onnx/hub.py
Outdated
repo_branch = "master" | ||
|
||
if lfs: | ||
return "https://github.com/{}/{}/blob/{}/".format(repo_owner, repo_name, repo_branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For lfs, the download URL should be media.githubusercontent.com/media. See "download_url" field in link for example. And "raw=true" is no longer needed for this URL.
return "https://github.com/{}/{}/blob/{}/".format(repo_owner, repo_name, repo_branch) | |
return "https://media.githubusercontent.com/media/{}/{}/{}/".format(repo_owner, repo_name, repo_branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried this and unfortunately this 404s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's weird. I tried "https://media.githubusercontent.com/media/mhamilton723/models/onnx-hub/vision/classification/resnet/model/resnet101-v1-7.onnx" and it's giving me the payload. Let me play with the code a bit more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use ?raw=true
This pull request introduces 1 alert when merging ef6420d into c24cd42 - view on LGTM.com new alerts:
|
Thanks for the feedback @linkerzhang, some of the other folks in the community suggested we put this here because onnxmltools is just for converters. Do you have an email that I could loop into this discussion thread I just started? I can see motive for both and just want to ensure the community is aligned on what we should do. |
my email is, linkerzhang@yeah.net. How about onnx/model then? |
The advantage of adding this to onnx main repo is it can be part of the onnx release package and then users can simply import onnx.hub and get models... There is no release package for onnx\models ... |
We brought up this discussion in the steering committee and they mentioned onnx/onnx was the way to go to make it simple for folks to get started. onnx/model doesn't have any python package so it would be a big infra change and also less desireable from a easy user experience |
OK. Thanks for clarification! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... 0 file changed?
Sorry my mistake - I just fixed the problem. Please check again. |
@askhade and @linkerzhang Ready for your review, thanks for your help! |
f86e0c8
to
29fbeb3
Compare
Signed-off-by: Mark Hamilton <mhamilton723@gmail.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Mark Hamilton <mhamilton723@gmail.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Mark Hamilton <mhamilton723@gmail.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Mark Hamilton <mhamilton723@gmail.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Mark Hamilton <mhamilton723@gmail.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Guoyu Wang <wanggy@outlook.com> Co-authored-by: Chun-Wei Chen <jacky82226@gmail.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Jason Wang <jasowang@microsoft.com>
Co-authored-by: Kevin Chen <45886021+kevinch-nv@users.noreply.github.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
Co-authored-by: pranavm-nvidia <49246958+pranavm-nvidia@users.noreply.github.com> Signed-off-by: Jason Wang <jasowang@microsoft.com>
… Fixing sorting order for opset. Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Jason Wang <jasowang@microsoft.com>
Signed-off-by: Jason Wang <jasowang@microsoft.com>
CIs are failing because of flake8 errors: |
Looking... |
Signed-off-by: Jason Wang <jasowang@microsoft.com>
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good
Ke has agreed in #3663 (comment) but has not been reachable to clear the review. Since there are a number of other approvals, dismissing the review to unblock on team.
Please see model hub proposal and onnx/models manifest PR for more info.