ONNX: output parameter has unsuppotred type 'ONNX_TYPE_SEQUENCE'

 
Hi, 

I am trying to get started with ONNX but I run into an issue when I try to run a model:

2023.06.13 15:43:10.345 delete2 (EURUSD,H1)     ONNX: output parameter has unsuppotred type 'ONNX_TYPE_SEQUENCE', inspect code 'Experts\delete2\delete2.mq5' (59:54)
2023.06.13 15:43:10.345 delete2 (EURUSD,H1)     OnnxRun failed, error 5802

Model


//+------------------------------------------------------------------+
//|                                                      delete2.mq5 |
//|                                  Copyright 2023, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
#resource "\\Files\\Python\\treea.onnx" as uchar ExtModel[]
//---- describe the shapes of the model's input and output data
   const long  ExtInputShape[] = {1,566};
   const long  ExtOutputShape[] = {1};
   //--- price movement prediction
   long     ExtHandle;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   long handle=OnnxCreateFromBuffer(ExtModel,ONNX_DEBUG_LOGS);
   if(!OnnxSetInputShape(handle,0,ExtInputShape))
     {
      Print("OnnxSetInputShape failed, error ",GetLastError());
      OnnxRelease(handle);
      //return(-1);
     }
//--- specify the shape of the output data
   if(!OnnxSetOutputShape(handle,0,ExtOutputShape))
     {
      Print("OnnxSetOutputShape failed, error ",GetLastError());
      OnnxRelease(handle);
      //return(-1);
     }
//---
   OnnxTypeInfo itype;
   OnnxTypeInfo otype;
   OnnxTypeInfo o2type;
   
   Print("OnnxGetInputName: " + OnnxGetInputName(handle,0));
   Print("OnnxGetInputCount: " + (string)OnnxGetInputCount(handle));
   Print("OnnxGetInputTypeInfo: " +  (string)OnnxGetInputTypeInfo(handle,0,itype));
   Print("OnnxGetOutputName 0: " + OnnxGetOutputName(handle,0));
   Print("OnnxGetInputCount: " + (string)OnnxGetOutputCount(handle));
   Print("OnnxGetOutputName 1: " + OnnxGetOutputName(handle,1));
   Print("OnnxGetOutputTypeInfo 0: " + (string)OnnxGetOutputTypeInfo(handle,0,otype));
   Print("OnnxGetOutputCount: " + (string)OnnxGetOutputCount(handle));
   Print("OnnxGetOutputTypeInfo 1: " + (string)OnnxGetOutputTypeInfo(handle,1,o2type));

   vectorf x_normf  = vectorf::Ones(566);
   vector y_norm(1);
   vector y2_norm(3);
   
   if(!OnnxRun(handle,ONNX_DEBUG_LOGS,x_normf,y_norm,y2_norm))
     {
      Print("OnnxRun failed, error ",GetLastError());
      OnnxRelease(handle);
      //return(-1);
     }
     
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   
  }
//+------------------------------------------------------------------+


I assume I have to change the way I create the model?
Thanks for any ideas in advance.

Best, Julian.

Files:
 

I found a solution to my problem; I just deactivated zipmap when converting with convert_sklearn


options = {id(model): {'zipmap': False}}
Reason: