You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 accept DataViewSchema, then convert the DataViewSchema to an empty IDataView, and pass the empty IDataView to the methods accepting IDataView.
The performance of methods accepting IDataView may be improved if EmptyDataView is created from the Schema of the IDataView and passed to ConvertToOnnxProtobuf, 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 an internal class, so I have to implement my own EmptyDataView.
So the call to Transform itself is a lazy call. Unless you get a cursor and start itterating over the data itself this call should basically be a NO-OP (not quite true as it does some validations and still sets up the pipeline, but no actual "processing" should take place).
Are you seeing something that is showing its actually doing data processing there?
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: