Skip to content

DOC Update advanced installation instructions from macOS #29603

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

Open
lesteve opened this issue Aug 1, 2024 · 3 comments · May be fixed by #31361
Open

DOC Update advanced installation instructions from macOS #29603

lesteve opened this issue Aug 1, 2024 · 3 comments · May be fixed by #31361

Comments

@lesteve
Copy link
Member

lesteve commented Aug 1, 2024

I think we should kind of wait for the dust to settle on #29546 but I am pretty sure that with the improvements in OpenMP detection in Meson 1.5 mesonbuild/meson#13350, you don't need to set any environment variables and that our macOS installation doc can be simplified.

We may be setting environment variable in our CI as well, this is worth a look if we can remove them.

cc @EmilyXinyi if you feel like working on it at one point.

I guess it's good to note that this is a positive side-effect of moving away from setuptools to Meson: some things just work better out of the box. I am certainly slightly biased but I am personally convinced that the cost of switching was worth it. Future will tell if I was wrong but I am reasonably confident about this 😉.

@github-actions github-actions bot added the Needs Triage Issue requires triage label Aug 1, 2024
@lesteve lesteve added Documentation and removed Needs Triage Issue requires triage labels Aug 1, 2024
@EmilyXinyi
Copy link
Contributor

Thank you @lesteve I think you are right and I can update the macOS installation doc. In terms of the environment variable, I am not 100% sure in the CI but on my local at least, I think we need to update test_openmp_parallelism_enabled and any code associated with it.

@lesteve
Copy link
Member Author

lesteve commented Aug 1, 2024

Also for people on macOS M1 machines like @ogrisel and @glemaitre I am wondering whether this may be a way to avoid having to install compilers from conda-forge and avoid the ccache limitation with known but quirky work-arounds conda-forge/compilers-feedstock#31.

Of course, there may be other caveats when switching between conda-forge compilers (current way of working for people on macOS machine I would say) to system clang with libomp installed with brew.

@lesteve
Copy link
Member Author

lesteve commented Aug 1, 2024

In terms of the environment variable, I am not 100% sure in the CI but on my local at least, I think we need to update test_openmp_parallelism_enabled and any code associated with it.

So if you build locally scikit-learn without OpenMP support and you run all the tests, you need to set the environment variable SKLEARN_SKIP_OPENMP_TEST to skip this particular test. This is what is done in the CI indeed, see

pylatest_conda_mkl_no_openmp:
DISTRIB: 'conda'
LOCK_FILE: './build_tools/azure/pylatest_conda_mkl_no_openmp_osx-64_conda.lock'
SKLEARN_TEST_NO_OPENMP: 'true'
SKLEARN_SKIP_OPENMP_TEST: 'true'
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '6' # non-default seed

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

Successfully merging a pull request may close this issue.

2 participants