Skip to content

[Tools] MlResponse: assure equality of number of checked features to that in the .onnx file#16424

Open
lubynets wants to merge 1 commit into
AliceO2Group:masterfrom
lubynets:ml
Open

[Tools] MlResponse: assure equality of number of checked features to that in the .onnx file#16424
lubynets wants to merge 1 commit into
AliceO2Group:masterfrom
lubynets:ml

Conversation

@lubynets
Copy link
Copy Markdown
Contributor

In the current implementation of the code, if the number of features to be checked (mCachedIndices size) is not equal to the number of features stored in the .onnx file (accessible by OnnxModel::getNumInputNodes()), then:

  • if the former is less than the latter, the code crashes at the moment of model application in OnnxModel::evalModel() via handling an exception thrown deeper in the stack;
  • if the former is greater than the latter, the code does not crash at all.

This PR proposes to check the mentioned sizes before model application, while model is initialized and throw a fatal error if the sizes are not equal.

@github-actions
Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 0 warnings, 🔕 0 disabled

@github-actions github-actions Bot changed the title MlResponse: assure equality of number of checked features to that in the .onnx file [Tools] MlResponse: assure equality of number of checked features to that in the .onnx file May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant