ML.net how to create DataFrame or DataView from example class without using Data.LoadFromInumerable/LoadFromText

114 views Asked by At
 public class OnnxInput
 {
 [VectorType(1 * 24 * 1)]
 [ColumnName("lambda_input")]
 public float[] Open { get; set; }
 }

 IDataView emptyDv = mlContext.Data.LoadFromEnumerable(new 
 OnnxInput[24]);

 return onnxPredictionPipeline.Fit(emptyDv);

which works fine in debug mode but not in release mode.

I need to represent the class structure as a DataFrame (Microsoft.Data.Analysis) or similar.

However,in release mode using the .NET native compiler there is some JIT usage from an internal function from the LoadFromInumerable which obviously fails and I need a workaround.

Is it possible to use DataFrames or anything else to exactly achieve creation of the DataView to replace the LoadFromInumerable routine using the example class structure?

I have tested some DataFrames and they seem to be ok in release mode for .NET native but I dont know how to achieve converting the data structure of the class to a dataframe or similar.

I have tried to use the functions that are supposed to be compatible with .NET native and they fail.I need a workaround using any different method to enable me to use my class structure (OnnxInput) using a release build with .NET native.

0

There are 0 answers