-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Create a binary wheel for Mac OSX #5586
Comments
Hey @hcho3, my suggestion would be to try and use the official Homebrew tap again before starting your own, since formula are precompiled, which makes installation much faster. I'd recommend breaking it into two steps:
|
We can build pre-built bottles in a tap. I proposed making a tap as an interim measure. Yes, we should submit a pull request again to homebrew-core, but it may take a while to get the pull request approved. |
Sounds good. I just submitted a PR for the first one. |
@ankane Interesting, so XGBoost recipe has been already upgraded to 1.0.2? I thought the recipe was still stuck to 0.9. In that case, users already have access to 1.0.2, albeit without OpenMP and without Python wrapper. |
Yeah, was updated a few days ago in a different PR. |
Got it. Let's see if we can get OpenMP and Python wrapper in this time. Thanks for the pull request! |
I just tested NumPy on Homebrew. Homebrew has updated many packages (like NumPy) to Python 3.8, but the default Python ( Essentially, I personally think including shared libraries in the Python wheels is a better way to go. Then users can do |
So something like what LightGBM is doing? The LightGBM wheel includes a shared lib for OSX. That might be a better way to go. Since Homebrew requires macOS High Sierra nowadays, we can build a shared lib using macOS High Sierra and include it in the wheel. |
Yeah, LightGBM takes that approach, but still requires cc @StrikerRUS |
fwiw, we should be able to use GitHub Actions or similar to build the shared libraries without Homebrew. GitHub Actions uses the latest macOS, but setting Example: https://github.com/ankane/ml-builds/blob/master/.github/workflows/xgboost-mac.yml |
@ankane Thanks a lot for the ping! I personally against of including any copy of Linking also microsoft/LightGBM#2435 here as a one possible solution. In addition, if I'm not mistaken, GitHub Actions and Azure Pipelines share the same containers and their policy of deprecating images is quite aggressive. Refer to microsoft/LightGBM#2822. So it won't be easy to build artifacts inside non-latest environments. |
@ankane @StrikerRUS Travis CI supports High Sierra. I'm currently testing XGBoost inside High Sierra environment: https://travis-ci.org/github/hcho3/xgboost/builds/679300818 |
@StrikerRUS Thanks for the info and links! Agree including OpenMP adds more complexity for maintainers, so may not be worth it. PyTorch might have a way to avoid the @hcho3 re High Sierra: great! |
Also, the OpenMP PR for Homebrew has been merged 🎉 |
#5597 will create binary wheels targeted for Mac High Sierra, Mojave, and Catalina. |
You can try it out by running |
Hey @hcho3, just tried it and works great! I think it'd be helpful to give instructions for xgboost.core.XGBoostError: XGBoost Library (libxgboost.dylib) could not be loaded.
Likely causes:
* OpenMP runtime is not installed (vcomp140.dll or libgomp-1.dll for Windows, libgomp.so for UNIX-like OSes)
* You are running 32-bit Python on a 64-bit OS
Error message(s): ['dlopen(/Users/runner/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/xgboost/lib/libxgboost.dylib, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib\n Referenced from: /Users/runner/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/xgboost/lib/libxgboost.dylib\n Reason: image not found'] Edit: Just pushed this for Ruby. ankane/xgboost-ruby@b2af203 |
@ankane 1.1.0 is just released with the mac wheel: https://pypi.org/project/xgboost/1.1.0/#files |
Was planning to make coffee while it installed, but it installed immediately. Please revert! In all seriousness, works great on Mojave. Ruby version is also out and submitted a version bump to Homebrew for the CLI. Homebrew/homebrew-core#54882 |
Request to submit XGBoost 1.0.0 to Homebrew (Homebrew/homebrew-core#50467) is still ongoing. In the meanwhile, we should create a Homebrew tap so that Mac users can install XGBoost easily.
Example:
cc @ankane
The text was updated successfully, but these errors were encountered: