Skip to content
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

Hummingbird integration with lgbm converter #404

Merged
merged 15 commits into from
Jul 8, 2020
Merged

Hummingbird integration with lgbm converter #404

merged 15 commits into from
Jul 8, 2020

Conversation

interesaaat
Copy link
Contributor

@interesaaat interesaaat commented Jun 23, 2020

Closes #403.

Add additional tests for Hummingbird
@CLAassistant
Copy link

CLAassistant commented Jun 23, 2020

CLA assistant check
All committers have signed the CLA.

@interesaaat
Copy link
Contributor Author

All tests pass. I don't know what is going on with LGTM, the logs look ok. @xadupre @wenbingl

@fgsilva
Copy link

fgsilva commented Jun 29, 2020

@interesaaat is there an update regarding this issue?

@interesaaat
Copy link
Contributor Author

@fgsilva the PR is ready, I am waiting for review.

@@ -68,6 +68,7 @@ jobs:
echo Test numpy installation... && python -c "import numpy"
python -m pip install %COREML_PATH% %ONNX_PATH%
python -m pip install tensorflow-cpu==1.15.0
python -m pip install torch==1.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onnxmltools doesn't have any dependency on pytorch, and if it is hummingbird dependency, it should be included in hummingbird setup script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! Pytorch dependency is actually in Hummingbird requirements, however we found that pytorch is not update on pip for windows. Another option is to install hummingbird directly from source rather than from pip. That would work. Should I install Hummingbird from github?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, can we put this line in the hummingbird requirements.txt : torch==1.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html,
Or add some lines in the code to log this issue or avoid the confusion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is complicated because torch==1.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html will not work for linux and mac. We have this logic to install PyTorch, but we are having problems with pip from windows. I think that installing directly from github is probably the best solution right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok installing from github does not work for python 3.7 because of this. Basically onnx uses typing which for some reason creates problem with Hummingbird. Since you are already manually installing tensorflor, is it a problem if for windows we also manually install pytorch in the pipeline?

@@ -17,7 +18,7 @@

def convert(model, name=None, initial_types=None, doc_string='', target_opset=None,
targeted_onnx=onnx.__version__, custom_conversion_functions=None,
custom_shape_calculators=None):
custom_shape_calculators=None, onnx_operators_only=False):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more accurate name is without_onnx_ml = True

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Let me rename it.

@@ -5,3 +5,15 @@
# --------------------------------------------------------------------------

from onnxconverter_common.utils import * # noqa


def hummingbird_installed():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesaaat and others added 2 commits July 6, 2020 16:54
remove hummingbird_installed from utils
point to the onnxconveter-common branch with the hummingb_installed code
trigger pipeline
@interesaaat
Copy link
Contributor Author

@wenbingl I think I addressed all of your comments. I have only modified the CI files to point to my fork of onnxconverter-common until the PR is not in. I can remove those changes once merged.

@wenbingl
Copy link
Member

wenbingl commented Jul 8, 2020

@wenbingl I think I addressed all of your comments. I have only modified the CI files to point to my fork of onnxconverter-common until the PR is not in. I can remove those changes once merged.

I merged the PR in onnxconverter-common so now you can update your final version and I will merge this PR then.

@interesaaat
Copy link
Contributor Author

Thanks! I am working on it right now. Will push in a minute.

@wenbingl wenbingl merged commit 8cf85d7 into onnx:master Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LightGBM converter integration with Hummingbird
4 participants