New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreatePredictionEngine<TSrc, TDst> is internal now. What is replacement? #1819

Open
NektoDron opened this Issue Dec 4, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@NektoDron

NektoDron commented Dec 4, 2018

The CreatePredictionEngine method is internal now. What is replacement for trainedModel (ITransfomer) and scheme (SchemaDefinition)? MakePredictionFunction can't use SchemaDefinition and makes exception for me.

@singlis singlis added the question label Dec 4, 2018

@singlis

This comment has been minimized.

Member

singlis commented Dec 4, 2018

Thank you for the question.

MakePredictionFunction is a generic extension on ITransformer -- so you should be able to call trainedModel.MakePredictionFunction. The schema for the input and output is determined from the generic arguments <TSrc, TDst>. These should be classes that have the format for the input (TSrc) and output (TDst).

Can you show an example of how you are using this now?

@NektoDron

This comment has been minimized.

NektoDron commented Dec 5, 2018

I can't define scheme in the TSrc's attributes because I have a VBuffer Feature field with a dynamic size. I make data and scheme definition on run-time and it was possible in the 0.7 and not possible in the 0.8+ versions. To be more exact I can make DataView with a dynamic scheme and train model with it, but I can't use its model for prediction because it makes exception like "Incompatible features column type: 'Vec' vs 'Vec<R4, 9>'".

@singlis singlis self-assigned this Dec 6, 2018

@Zruty0

This comment has been minimized.

Member

Zruty0 commented Dec 6, 2018

@NektoDron , thank you for reporting this issue. It looks like we have a gap in capabilities: there is no overload to MakePredictionFunction that takes schemaDefinition of input and output, like CreatePredictionEngine did.

It is a minor bug, we should be able to fix it quickly.

@Zruty0 Zruty0 added the bug label Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment