8000 CI: refactor Azure CI install script by lesteve · Pull Request #22567 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

CI: refactor Azure CI install script #22567

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

Merged
merged 6 commits into from
Feb 22, 2022

Conversation

lesteve
Copy link
Member
@lesteve lesteve commented Feb 21, 2022

The main goal is to make it easier to move to lock files #22448, i.e. to isolate Python environment creation from the rest.

This makes it easier to grok at the cost of making it a bit harder to follow what is happening in a particular build.

I split the install in four steps:

  • pre_python_environment_install: apt-get and other similar things
  • python_environment_install: installing the python environment as the name says
    - post_python_environment_install: setup_ccache and showing installed libraries. It could be removed and two lines added to the beginning of scikit_learn_install if deemed preferrable I ended up merging this step with scikit_learn_install
  • scikit_learn_install: environment variable setup for compilation, whether or not to use build isolation, ccache -s afterwards

@lesteve lesteve marked this pull request as draft February 21, 2022 11:18
@lesteve lesteve marked this pull request as ready for review February 21, 2022 15:25
Copy link
Member
@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for cleaning this up! Overall, I like the refactor.

# The "build_clib" command is implicitly used to build "libsvm-skl".
# To compile with a different compiler, we also need to specify the
# compiler for this command
python setup.py build_ext --compiler=intelem -i build_clib --compiler=intelem
Copy link
Member

Choose a reason for hiding this comment

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

I think we still have to wait till scikit_learn_install to run build_ext so we use the correct python environment?

Currently on main, the conda environment is created first and setup.py build_ext is called in that enviornment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch I fixed this and use [icc-build] in my last commit to make sure to test the BUILD_WITH_ICC logic and the CI passes (here is the log)

lesteve and others added 2 commits February 22, 2022 04:48
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
plus move post_pyton_environment_install to scikit_learn_install
Copy link
Member
@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM as well!

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
@lesteve
Copy link
Member Author
lesteve commented Feb 22, 2022

The CI is green merging, thanks for the reviews!

@lesteve lesteve merged commit c36f926 into scikit-learn:main Feb 22, 2022
@lesteve lesteve deleted the refactor-azure-ci-install branch February 22, 2022 13:05
thomasjpfan added a commit to thomasjpfan/scikit-learn that referenced this pull request Mar 1, 2022
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0