-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: example of how to use ONNX Runtime (Ort) in algorithms #1358
Conversation
Capybara summary for PR 1358 |
@ShujieL FYI, this potentially enables https://acts.readthedocs.io/en/latest/plugins/MLAlgorithms.html#ambiguityresolutionmlalgorithm. |
for more information, see https://pre-commit.ci
This latest commit now runs with
using the model file at https://github.com/eic/epic-data/blob/main/identity_gemm_w1x1_b1.onnx |
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.
Very nice! I only have a couple of extremely minor questions (the other one is below in this comment), but am otherwise very happy to see this!
Out of curiosity: do we want to keep all ML algorithms (or at least all that use ONNX) in a separate directory? Hopefully, we'll have lots of ML algorithms across all categories (e.g. calorimetry, PID, tracking, reco, etc.), so would it make sense to keep those with the corresponding non-ML algorithms?
No, this was just as an example so I wanted to keep it self-contained. I suspect this will change as it gets evolved and integrated (e.g. the ONNX support should go into a service). |
I see! Makes sense! This will work well for the time being! |
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.
I'm happy with this as-is! This is a really great example!
@veprbl This doesn't download the model by hand anymore in the CI pipelines here, and instead uses the one that is pulled in through the geometry calibrations distribution. |
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.
LGTM
This PR adds the hooks for ONNX Runtime (CPU only) for fast inference, and an example that doesn't actually do anything except... Enabled by default but not actually doing anything. - [ ] Bug fix (issue #__) - [x] New feature (issue: use ONNX for ML) - [ ] Documentation update - [ ] Other: __ - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [x] Changes have been communicated to collaborators @rahmans1 need to make to their code? No. No. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Briefly, what does this PR introduce?
This PR adds the hooks for ONNX Runtime (CPU only) for fast inference, and an example that doesn't actually do anything except... Enabled by default but not actually doing anything.
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
No.
Does this PR change default behavior?
No.