-
Notifications
You must be signed in to change notification settings - Fork 486
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 support for RegNet #833
Conversation
Thank you @asrimanth ! You can try:
For slow tests:
|
The documentation is not available anymore as the PR was closed or merged. |
@fxmarty The test environment works locally now, thank you! In the exporter_utils.py file, I wrote this earlier:
However, this page (https://huggingface.co/hf-internal-testing/tiny-random-RegNet) does not exist. So I changed it to
Even though the URL exists (https://huggingface.co/facebook/regnet-y-040), I keep running into errors when I test locally. Please advise. |
Hi @asrimanth you can maybe try https://huggingface.co/hf-internal-testing/tiny-random-RegNetModel What errors are you running into? |
Hello @fxmarty, Here's the error I'm getting:
I think these are the errors caused by the line in the exporter_utils.py file. I've made the changes as follows:
Since I'm new to open source, I'm open to advice. |
Hi @asrimanth! Can you show us the detailed errors that are printed before this summary please? Unfortunately this test summary info cut the error messages so it is hard to know how to solve it. |
@asrimanth Yes the last error in the trace is not informative unfortunately. We need to refactor a bit as for now we currently spawn a subprocess to do the ONNX export. To see the full trace and where the issue comes from, you can try: You could also simply try:
|
I've tried As for the command:
|
The package
|
Hello @regisss, I've tried that on my local M1 Macbook air and it doesn't work. So I tried it on a different linux machine and all of the tests pass with 1 warning. You can see the output below:
Can you please approve the workflow in order to run CI/CD tests? Or should I make any more changes? Please let me know. |
Hi @asrimanth the tests indeed pass! There remains a conflict in For that, you would need to pull on main, and merge or rebase into your branch, solving the conflict. It's probably just due to the fact that I moved the list of supported models in the doc to the overview page. |
…-RegNetModel, large to facebook/regnet-y-040
Thank you! You can add it here: https://github.com/huggingface/optimum/blob/main/docs/source/exporters/onnx/overview.mdx |
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.
The failing test is unrelated. Thank you for the addition!
@asrimanth can u tell me , how to find supported_task_maping for a model?i have been trying to understand but I am quite confused.. pls tell me how to find supported_task_maping for a model?? |
Hi @sushmanthreddy , you can use this method: https://huggingface.co/docs/optimum/main/en/exporters/task_manager#optimum.exporters.TasksManager.get_supported_tasks_for_model_type from optimum.exporters import TasksManager
print(TasksManager.get_supported_tasks_for_model_type("bert", exporter="onnx").keys()) Are you asking in order to add a new architecture? |
@fxmarty yes I was asking for adding new architecture |
Awesome, you could add it in the mapping here: optimum/optimum/exporters/tasks.py Line 343 in d024c5f
|
Fixes #555
I've made the changes, however, is there any way I can verify whether my approach is correct? In other words, could anyone give me a few pointers as to how to test the integration locally?