What could be the error, log:
2025.07.03 13:41:23.699 Core 1 2025.06.27 22:00:00 ONNX: Non-zero status code returned while running TreeEnsembleRegressor node. Name:'' Status Message: E:\workspace\external\onnx\onnx-runtime\src\core\framework\execution_frame.cc:173 onnxruntime::IExecutionFrame::GetOrCreateNodeOutputMLValue shape && tensor.Shape() == *shape was false. OrtValue shape verification failed. Current shape:{1} Requested shape:{1,1} 2025.07.03 13:41:23.699 Core 1 2025.06.27 22:00:00 ONNX: execute OnnxRun failed (OrtStatus: 6 'Non-zero status code returned while running TreeEnsembleRegressor node. Name:'' Status Message: E:\workspace\external\onnx\onnx\onnx-runtime\src\core\framework\execution_frame.cc:173 onnxruntime::IExecutionFrame::GetOrCreateNodeOutputMLValue shape && tensor.S...'...'), inspect code 'ôU! fìV' (130:4)
Catboost regressor model:
const ulong output_shape[] = {1}; if(!OnnxSetOutputShape(ExtHandle, 0, output_shape)) // Ошибки нет! { Print("OnnxSetOutputShape 2 error ", GetLastError()); return(INIT_FAILED); }
vectorf out2(1); OnnxRun(ExtHandle, ONNX_DEFAULT, f, out2); // Возникают вышеприведенные ошибки
As far as I understand, it is swearing at the shape of the output tensor (array). But it is set correctly.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register

Check out the new article: Regression models of the Scikit-learn Library and their export to ONNX.
In this article, we will explore the application of regression models from the Scikit-learn package, attempt to convert them into ONNX format, and use the resultant models within MQL5 programs. Additionally, we will compare the accuracy of the original models with their ONNX versions for both float and double precision. Furthermore, we will examine the ONNX representation of regression models, aiming to provide a better understanding of their internal structure and operational principles.
Scikit-learn is one of the most popular and widely used libraries for machine learning in the Python community. It offers a wide range of algorithms, a user-friendly interface, and good documentation. The previous article, "Classification Models of the Scikit-learn Library and Their Export to ONNX", covered classification models.
In this article, we will explore the application of regression models in the Scikit-learn package, compute their parameters with double precision for the test dataset, attempt to convert them to the ONNX format for float and double precision, and use the obtained models in programs on MQL5. Additionally, we will compare the accuracy of the original models and their ONNX versions for float and double precision. Furthermore, we will examine the ONNX representation of regression models, which will provide a better understanding of their internal structure and operation.
Author: MetaQuotes