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

Fix for builds on Mac M1 infrastructure #641

Merged
merged 3 commits into from
Jul 20, 2023
Merged

Conversation

bsaunders27
Copy link
Contributor

@bsaunders27 bsaunders27 commented Jul 18, 2023

Proposed changes

Following up with issues I saw with pip install in M1 architecture. Deep dived the issue trying conda env create and found issues there as well, so added some fixes for that build on M1 (mostly updating for compatability with numpy for Darwin arm64 sys build). Breaking out as separate commits to simplify cherry picking since some issues may not be generalizable. Known related issue #534.

Types of changes

What types of changes does your code introduce to CausalML?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

None, other than the fact that this is my first PR and I would not be surprised if there's a more elegant resolution

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2023

CLA assistant check
All committers have signed the CLA.

@bsaunders27 bsaunders27 marked this pull request as ready for review July 18, 2023 01:01
@nelehuvaere
Copy link

The change in _builder.pyx also solves the cython compiling error on windows. Thanks for the pr, hope it gets merged.

Copy link
Collaborator

@jeongyoonlee jeongyoonlee left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the contribution!

@bsaunders27
Copy link
Contributor Author

ah fiddle dee dee, let me see what broke

…troubleshooting)

* numpy 1.21.4 - Fix for arm64 Darwin install (Mac M1)
* scipy 1.10.0 - Updated numpy dependency
* scikit-learn - 1.0.2 Updated numpy dependency
* stasmodels 0.13.1 - No install if numpy existing (moving above to conda install)
* torch 1.8.0 - Unavailable on python 3.9
@@ -5,6 +5,7 @@ dependencies:
- pip
- python=3.9
- setuptools=52.0.0
- numpy=1.22

Choose a reason for hiding this comment

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

Curious to know, what is the difference between putting numpy in this section, vs. the pip section? You don't want to specify a minor version like for all the other dependencies?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The dependencies listed above will be installed using conda, while the ones in the pip section will use pip. If available, conda installation is more robust as it packages binaries and executables necessary for installation together with the Python library, but not all packages are available in conda.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @eugeneyarovoi , so initially I'd added above to conda install since numpy was required for pip wheel building prior to installs and saw failures for anything before numpy==1.22.0. I tested again recently and after updating all of the subsequent package versions and looks like it's fine, but if there's a preference for conda as the package handler re: @jeongyoonlee can leave as is. Did find a few other items breaking that I'd like to update quick for the arm64x build on mac so might have a quick fast-follow

@jeongyoonlee jeongyoonlee added the installation Issues related to installation label Jul 20, 2023
@jeongyoonlee jeongyoonlee merged commit b22da42 into uber:master Jul 20, 2023
6 checks passed
ras44 pushed a commit to ras44/causalml that referenced this pull request Aug 22, 2023
* Fix for build breaks (see uber#534)
* Removing version from pip (caused errors in `conda env create`)
* Myraid of fixes for `conda env create` method (defaulted to this for troubleshooting)
* numpy 1.21.4 - Fix for arm64 Darwin install (Mac M1)
* scipy 1.10.0 - Updated numpy dependency
* scikit-learn - 1.0.2 Updated numpy dependency
* stasmodels 0.13.1 - No install if numpy existing (moving above to conda install)
* torch 1.8.0 - Unavailable on python 3.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Issues related to installation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants