Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CI Use conda instead of pip to install anaconda-client #19528

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 20 commits into from
Mar 17, 2021

Conversation

alfaro96
Copy link
Member

@alfaro96 alfaro96 commented Feb 23, 2021

What does this implement/fix? Explain your changes.

This PR fixes the Wheel builder workflow. I decided to use the recommended option, that is, install anaconda-client using conda.

@alfaro96 alfaro96 changed the title FIX Install anaconda-project before installing anaconda-client FIX Install anaconda-project before anaconda-client Feb 23, 2021
@alfaro96 alfaro96 changed the title FIX Install anaconda-project before anaconda-client CI Use conda instead of pip to install anaconda-client Feb 23, 2021
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.

I do not have a strong opinion on this. Since the anaconda-client package is python-only, installing from git seems okay with me.

In the travis case, downloading and install miniforge would add a little bit of time to the build and I think we want to conserve our credits there.

@alfaro96
Copy link
Member Author

alfaro96 commented Feb 23, 2021

I do not have a strong opinion on this. Since the anaconda-client package is python-only, installing from git seems okay with me.

In the travis case, downloading and install miniforge would add a little bit of time to the build and I think we want to conserve our credits there.

I tried to install anaconda-project before anaconda-client from git (as requested by the requirements.txt file) and I ran into the error shown here: https://github.com/scikit-learn/scikit-learn/runs/1959589120.

Nevertheless, I ran:

pip install git+https://github.com/Anaconda-Platform/anaconda-project
pip install git+https://github.com/Anaconda-Platform/anaconda-client

in my machine and it works.

Not sure what is the problem in Github Actions.

@thomasjpfan
Copy link
Member

Ah I see, if installing with anaconda-client from conda fixes a bug, then I am +1 with this PR.

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 if you re-rerun [cd build] after the last commit just to make sure that it works with the the current state of the PR.

@ogrisel
Copy link
Member

ogrisel commented Feb 25, 2021

Actually, I am confused, none of the above [cd build] ran successfully and the one with conda caused:

 anaconda: error: argument : invalid choice: 'scikit-learn-wheels-staging' (choose from 'auth', 'label', 'channel', 'config', 'copy', 'download', 'groups', 'login', 'logout', 'move', 'notebook', 'package', 'remove', 'search', 'show', 'upload', 'whoami')
Error: Process completed with exit code 2.

so maybe the the command-line parsing has changed. You can test it locally by creating your own personal anaconda.org channel.

@alfaro96
Copy link
Member Author

alfaro96 commented Mar 2, 2021

Sorry for the late reply. The actual problem is that ANACONDA_TOKEN is empty (secret) so the command interprets upload as token for the -t option .

Let me check for a personal project.

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.

What is the status of this @alfaro96? Does it works on the CI configured on your repo?

Comment on lines +21 to +24
MINICONDA_URL="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh"
wget $MINICONDA_URL -O miniconda.sh
MINICONDA_PATH=$HOME/miniconda
chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
Copy link
Member

Choose a reason for hiding this comment

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

Better name this MINIFORGE_URL and miniforge.sh to avoid confusion.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not getting your point 😕.

@alfaro96
Copy link
Member Author

What is the status of this @alfaro96? Does it works on the CI configured on your repo?

Let me run the Wheel builder workflow with the latest commit and I will let you know the result ASAP.

@alfaro96
Copy link
Member Author

alfaro96 commented Mar 15, 2021

Here is the workflow: https://github.com/alfaro96/scikit-learn/runs/2115411152?check_suite_focus=true.

It is failing, but I think that it is related with the token.

Edit: I have figured out that the error was related with a bug in Python 3.9. I have downgraded to Python 3.8 and it is working. Here is the working run: https://github.com/alfaro96/scikit-learn/actions/runs/657229124.

@ogrisel
Copy link
Member

ogrisel commented Mar 16, 2021

Edit: I have figured out that the error was related with a bug in Python 3.9. I have downgraded to Python 3.8 and it is working. Here is the working run: https://github.com/alfaro96/scikit-learn/actions/runs/657133352.

This is actually failing:

build_tools/github/upload_anaconda.sh: line 11: syntax error near unexpected token `fi'
Error: Process completed with exit code 2.

@alfaro96
Copy link
Member Author

alfaro96 commented Mar 16, 2021

Edit: I have figured out that the error was related with a bug in Python 3.9. I have downgraded to Python 3.8 and it is working. Here is the working run: https://github.com/alfaro96/scikit-learn/actions/runs/657133352.

This is actually failing:

build_tools/github/upload_anaconda.sh: line 11: syntax error near unexpected token `fi'
Error: Process completed with exit code 2.

Yep, I have committed a new version that I hope does not fail 😅.

Let us wait for the https://github.com/alfaro96/scikit-learn/actions/runs/657229124 to finish and, if it works, I will clean the files changed 😉.

@alfaro96
Copy link
Member Author

Okay, the workflow (https://github.com/alfaro96/scikit-learn/actions/runs/657229124) is working and the wheels properly uploaded to the corresponding index: https://pypi.anaconda.org/alfaro96/simple/scikit-learn/.

Let me clean the files changed for preparing to merge.

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.

Great, let's merge to give it a try for the next nightly builds uploads.

@ogrisel ogrisel merged commit edc6995 into scikit-learn:main Mar 17, 2021
@ogrisel
Copy link
Member

ogrisel commented Mar 17, 2021

Thank you very much @alfaro96.

@alfaro96 alfaro96 deleted the fix_anaconda_upload branch March 17, 2021 14:49
@glemaitre glemaitre mentioned this pull request Apr 22, 2021
12 tasks
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 22, 2021
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.