-
Notifications
You must be signed in to change notification settings - Fork 279
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
Should SKLearn operators be assumed to produce a single output? #656
Comments
took an extremely silly hard coded approach here: stillmatic@0a2fc96 |
Hey let me take a stab at this. It requires several changes in order to make it generic, but I agree that it could be the source of the error behind #676. |
Of course unless you want to try to fix this yourself! |
yeah, the generic case is quite tricky, hard coding it is much easier ;) tried to do a cleaner implementation by adding I don't think it's the problem behind #676, after debugging more, that problem appears to be specifically in the GEMM -> ONNX conversion. |
@stillmatic can you check if this repo will solve your problem? |
interesting, this definitely looks like it is properly generating the two variables. on one of my internal models, I'm seeing this output
though I can't generate a reproducible example. it doesn't seem to affect prediction, onnx is happy with it. let me dig a bit more over the next few days! |
@interesaaat -- sorry for delayed response. I have tested your branch with internal models and everything seems to be working, so think it could be upstreamed. Thanks for the help! |
See https://github.com/microsoft/hummingbird/blob/main/hummingbird/ml/_parse.py#L256
Consider models which implement
predict
andpredict_proba
functions. These return bothlabel
andprobabilities
as outputs. The current logic means that we cannot name the outputs in the hummingbird conversion step (ie withoutput_names
argument toextra_config
) and instead have to perform some ONNX graph surgery afterwards.The text was updated successfully, but these errors were encountered: