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

add ONNXInference algorithm, use it to provide EcalEndcapNClusterParticleIDs #1618

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Sep 19, 2024

Briefly, what does this PR introduce?

image

This provides a calorimeter PID capability using ONNXruntime inference engine. The inference algorithm is generalized into a separate algorithm which inputs and outputs edm4eic::Tensor values introduced by eic/EDM4eic#96.

A set of weights needed to run this are provided in eic/epic-data#22, and is generated using a script from eic/detector_benchmarks#91.

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No

Does this PR change default behavior?

Yes

Copy link
Contributor

@simonge simonge left a comment

Choose a reason for hiding this comment

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

This feels like a lot of extra code for simply mapping values into tensors and back again. I don't have any specific suggestion as to how it could or even should be avoided or generalized.

Otherwise looks good.

src/algorithms/onnx/ONNXInference.cc Show resolved Hide resolved
@veprbl
Copy link
Member Author

veprbl commented Nov 19, 2024

This feels like a lot of extra code for simply mapping values into tensors and back again. I don't have any specific suggestion as to how it could or even should be avoided or generalized.

That's either unavoidable, or a generic mapper, if it exists, can be implemented in this paradigm too. At least ONNX part can be reused, instead of having to copy it into every application, and this supports export PODIO data for training.

@veprbl veprbl requested a review from Chao1009 November 19, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants