ConvertToOnnx
should also accept DataViewSchema
#6448
Labels
ConvertToOnnx
should also accept DataViewSchema
#6448
Is your feature request related to a problem? Please describe.
Currently, saving a model to zip file only requires a
DataViewSchema
, but saving a model to ONNX requiresIDataView
.Inside
ConvertToOnnxProtobufCore
, a prediction was performed (transform.Transform(inputData)
), which may be expensive if the training data set is large.Describe the solution you'd like
ConvertToOnnx
should have overloads that acceptDataViewSchema
, then convert theDataViewSchema
to an emptyIDataView
, and pass the emptyIDataView
to the methods acceptingIDataView
.The performance of methods accepting
IDataView
may be improved ifEmptyDataView
is created from the Schema of the IDataView and passed toConvertToOnnxProtobuf
, instead of full data.Describe alternatives you've considered
Nil
Additional context
I have implemented the proposed solution and that seems working well. It is unfortunate that
EmptyDataView
is aninternal
class, so I have to implement my ownEmptyDataView
.The text was updated successfully, but these errors were encountered: