Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Upload nightly built wheels to scientific-python-nightly-wheels #26417

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 5 commits into from
Jun 19, 2023

Conversation

jarrodmillman
Copy link
Contributor

@jarrodmillman jarrodmillman commented May 22, 2023

Context:

scientific-python/specs#185

Motivation for the change to the new repo:

#26417 (comment)

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.

Overall, I'm okay with this. Is there a discussion where other projects are onboard with migrating other to this new index?

Logistically, we'll need to generate a new token for https://anaconda.org/scientific-python-nightly-wheels. For security reasons, each project in scipy-wheels-nightly have their own tokens. Also there are many maintainers on scipy-wheels-nightly that have permission to generate a new token for their project.

For scientific-python-nightly-wheels, are you thinking of using the same permission setup as scipy-wheels-nightly?

@betatim
Copy link
Member

betatim commented May 22, 2023

Do we know of people who use the scikit-learn nightlies (e.g. projects that depend on scikit-learn who are testing)? How can we let them know that the location will change?

There are similar PRs for numpy, scipy, etc. Swapping scikit-learn over before the dependencies we test against are switched over will lead to some CI failures. I think that is fine, if we know about it.

It might be worth taking a moment to ponder how to make the transition and in which order.

@ogrisel
Copy link
Member

ogrisel commented May 22, 2023

Also, prior to switching to a new repo, we should first put tools in place to automatically clean-up old wheels and only keep the last 5 or 10 nightly builds for each project. We started a discussion on this a while ago here:

https://discuss.scientific-python.org/t/interest-in-github-action-for-scipy-wheels-nightly-uploads-and-removals/397

@betatim
Copy link
Member

betatim commented May 22, 2023

We are trying to collect tools and recommendations for this in scientific-python/specs#185 (this is probably also the source of the PRs)

@bsipocz
Copy link
Contributor

bsipocz commented May 22, 2023

Do we know of people who use the scikit-learn nightlies (e.g. projects that depend on scikit-learn who are testing)? How can we let them know that the location will change?

Plan is to open a PR (we have the tooling for it) for each project we find on github using the old URL once all the core scientific python projects have moved, and produced at least one wheel to the new location

@martinfleis
Copy link

Logistically, we'll need to generate a new token for https://anaconda.org/scientific-python-nightly-wheels. For security reasons, each project in scipy-wheels-nightly have their own tokens. Also there are many maintainers on scipy-wheels-nightly that have permission to generate a new token for their project.

For scientific-python-nightly-wheels, are you thinking of using the same permission setup as scipy-wheels-nightly?

Yes, the idea is that this will be similar. @jarrodmillman already added some people but we assume that anyone who needs it will get access to generate project-specific tokens.

@ogrisel
Copy link
Member

ogrisel commented May 23, 2023

To address @betatim's concerns (#26417 (comment)) maybe we could upload both to the old and the new location for some time to ensure a smooth transition and leave time to downstream projects (including potentially unknown private repositories?) to adapt their own CIs?

BTW, why do we need a new channel in the first place?

@ogrisel ogrisel changed the title Upload nighlighties to new location Upload nightly built wheels to scientific-python-nightly-wheels May 23, 2023
@betatim
Copy link
Member

betatim commented May 23, 2023

BTW, why do we need a new channel in the first place?

I think one motivation for moving to a new name is branding (and with that a win for scientific python, which then helps with getting funding). Another aspect is that I think it would be nice to expand the number of packages that create nightlies and use nightlies in their CI to help catch problems earlier (aka less needs for "a quick patch release" after making a release). If we want to expand the number of projects uploading nightlies I think it makes sense to move the ownership (and responsibility) of keeping it secure, adding/removing people, etc to a place where there is a group of people taking care of it as well as making it more obvious who to contact to get access. I have to admit that I don't really know who/what takes care of the current nightlies area, I assume it is mostly Olivier.

I think the goal is to write up who to contact, etc in the SPEC I linked in a previous comment. But it still needs a bunch of work to figure out what to add to it, what the answers should be, etc.

@ogrisel
Copy link
Member

ogrisel commented May 24, 2023

I have to admit that I don't really know who/what takes care of the current nightlies area, I assume it is mostly Olivier.

There are a bunch of anaconda accounts with admin rights from various scipy related projects.

@lesteve
Copy link
Member

lesteve commented May 25, 2023

The current status (from scientific-python/specs#182):

I don't think the disruption is going to be too great for scikit-learn development wheels consumers. Looking at download stats from anaconda.org, the most downloaded scikit-learn wheel has been downloaded 15 times:
https://anaconda.org/scipy-wheels-nightly/scikit-learn/files?sort=ndownloads&sort_order=desc&version=1.3.dev0

I double-checked that this count gets updated by doing pip install, although maybe the download count gets reset when we upload a new wheel with the same name as we do in scikit-learn.

As suggested in the scipy similar PR scipy/scipy#18504 (comment) we could upload a dummpy package sdist that raises an error and mentions the new URL to push people towards the new URL and avoid they use an outdated development wheel.

@betatim
Copy link
Member

betatim commented May 25, 2023

scientific-python/specs#195 is the latest PR I have to update SPEC4

I think if we announce the new URL on the mailing list and other places where the old URL was announced that should help catch a lot of the users that we don't know of.

@jarrodmillman jarrodmillman marked this pull request as ready for review May 31, 2023 15:29
@tupui
Copy link

tupui commented May 31, 2023

Hi folks,

So here are the latest information about the migration. NumPy and SciPy have now migrated (still some small things to adjust, but some wheels are there.)

To add a new package this needs to be done (instructions have been updated on the SPEC4):

  1. Tell us who needs to be responsible for nighlies for your package. And give us the anaconda handles.
  2. We download from PyPi a wheel and upload it using an admin token. This will create the package.
  3. We link the package to your group.
  4. You can now create a personal token and upload your package.

Let me know if you need any assistance, I am happy to make calls to speed up things or we can chat on Slack/Discord.

@tupui
Copy link

tupui commented May 31, 2023

As for the cleanup. We are discussing doing this on our side for all projects. We will keep folks in the loop.

@ogrisel
Copy link
Member

ogrisel commented May 31, 2023

@tupui I assume @thomasjpfan and I can continue to represent scikit-learn w.r.t. nightly wheel uploads:

Maybe @betatim is interested to join us?

@betatim
Copy link
Member

betatim commented May 31, 2023

Sounds like a plan. I am https://anaconda.org/betatim

@tupui
Copy link

tupui commented May 31, 2023

@ogrisel done. There was also @jjerphan so you are now 3 in your group. You should all have admin access and can add/remove folks in your group (I think, let me know if you have any issues.) We don't impose anything here. We just ask admins to be mindful of security and it helps to reduce the attack surface if only a few folks have access.

If you want I can do the next step which is to download any wheel from PyPi and upload it to create the package. Then you can take over.

@betatim
Copy link
Member

betatim commented May 31, 2023

I think before we can switch over scikit-learn to the new location we need pandas to be uploading there as well. So it might take a few more days before we can start publishing a nightly in the new place. I guess there isn't much downside to you already uploading a wheel there? So yeah go ahead please

@tupui
Copy link

tupui commented May 31, 2023

Done, I uploaded scikit_learn-1.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl. From now on you should be able to take over with a personal token.

@jarrodmillman
Copy link
Contributor Author

@betatim The Pandas PR was merged pandas-dev/pandas#53341. And it looks like all the wheels are uploaded now: https://anaconda.org/scientific-python-nightly-wheels/pandas/files

You may want to take a quick look to make sure all the wheels you expect are there. Let me know if there are any issues.

@lesteve
Copy link
Member

lesteve commented Jun 13, 2023

I triggered a scipy-dev build and the install works fine from the new location. There are some test failures but there are also some failures on main.

I guess what is left to do is to create a token and add a secret to the scipy-dev wheel upload job?

@tupui
Copy link

tupui commented Jun 13, 2023

Yes, the 3 folks above can create a personal token and update the upload job.

@bsipocz
Copy link
Contributor

bsipocz commented Jun 15, 2023

May I have a gentle ping on this? I would like to open PRs to downstreams that use scipy-wheels-nightly, but would like to do this once all the packages migrated, and scikit-learn is the only one remaining.

@lesteve
Copy link
Member

lesteve commented Jun 16, 2023

@ogrisel @betatim @thomasjpfan if one of you adds me (anaconda.org username: lesteve), I can have a look.

By the way, I am guessing there is no way to test the wheels upload works before merging this PR?

@tupui
Copy link

tupui commented Jun 16, 2023

@ogrisel @betatim @thomasjpfan if one of you adds me (anaconda.org username: lesteve), I can have a look.

By the way, I am guessing there is no way to test the wheels upload works before merging this PR?

You can test locally the credentials with the Anaconda CLI. But if the current mechanism is working, there is no reason the new one is not. It's strictly the same thing, you just need to update the upload location and the token.

@betatim
Copy link
Member

betatim commented Jun 19, 2023

I generated a personal API token and stored it in SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN for this repository. The token will expire on 1st Dec 2099.

@betatim betatim merged commit 33708a9 into scikit-learn:main Jun 19, 2023
@betatim
Copy link
Member

betatim commented Jun 19, 2023

Let's see what happens tomorrow morning.

@tupui
Copy link

tupui commented Jun 19, 2023

Just a recommendation, nothing more. Besides having set the minimal permissions for the token, I would advice you to set an expiry date which is closer to a year.

Something you might want to do is to edit the page description as Anaconda only understand MD. The changes won't be affected by a new upload.

@lesteve
Copy link
Member

lesteve commented Jun 20, 2023

Looks like it worked fine: https://anaconda.org/scientific-python-nightly-wheels/scikit-learn/files?version=1.4.dev0

jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jun 29, 2023
jeremiedbb pushed a commit that referenced this pull request Jun 29, 2023
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants