Skip to content

[tmva][sofie] Adds the missing ONNX operators Asinh, Acosh, and Atanh to TMVA SOFIE. - #23299

Merged
guitargeek merged 1 commit into
root-project:masterfrom
Sainava:feature/sofie-inverse-hyperbolic-ops
Sep 8, 2026
Merged

[tmva][sofie] Adds the missing ONNX operators Asinh, Acosh, and Atanh to TMVA SOFIE.#23299
guitargeek merged 1 commit into
root-project:masterfrom
Sainava:feature/sofie-inverse-hyperbolic-ops

Conversation

@Sainava

@Sainava Sainava commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This Pull Request
Adds the missing ONNX operators Asinh, Acosh, and Atanh to TMVA SOFIE.

Changes & Fixes

  • tmva/sofie/inc/TMVA/ROperator_BasicUnary.hxx: Added Asinh, Acosh, and Atanh to the EBasicUnaryOperator enum and their corresponding UnaryOpTraits specializations, following the same pattern already used for Sin, Cos, and Atan. A comment notes that Acosh and Atanh have restricted domains (x >= 1 and |x| < 1 respectively) and rely on std::acosh and std::atanh returning NaN outside those ranges.
  • tmva/sofie_parsers/src/ParseBasicUnary.cxx & tmva/sofie_parsers/src/RModelParser_ONNX.cxx: Added the corresponding parser lambdas and operator registrations, matching the existing ParseAtan pattern exactly.
  • tmva/sofie/test/generate_input_models.py & tmva/sofie/test/TestCustomModelsFromONNX.cxx: Added tests for all three operators, utilizing domain appropriate input values for Acosh and Atanh.

Checklist

  • Tested changes locally
  • Updated the docs (if necessary)

This PR fixes #23275

@guitargeek, following up on our conversation, this PR implements Asinh, Acosh, and Atanh as outlined in the issue. Please let me know if this looks good to you or if you need any adjustments.Thanks!

Signed-off-by: Sainava <sainava.modak@gmail.com>
@Sainava
Sainava requested a review from lmoneta as a code owner September 8, 2026 07:57
@guitargeek guitargeek self-assigned this Sep 8, 2026

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@guitargeek
guitargeek merged commit d3a5047 into root-project:master Sep 8, 2026
25 of 32 checks passed
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.

Add support for missing ONNX inverse hyperbolic operators (Asinh, Acosh, Atanh) in TMVA SOFIE

2 participants