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

Roll out nightly and stable release packages #400

Open
9 of 12 tasks
ScottTodd opened this issue Oct 31, 2024 · 8 comments
Open
9 of 12 tasks

Roll out nightly and stable release packages #400

ScottTodd opened this issue Oct 31, 2024 · 8 comments
Assignees

Comments

@ScottTodd
Copy link
Member

ScottTodd commented Oct 31, 2024

Tasks

Target: this week (by Nov 1)

This will get us pip install shark-platform -f https://github.com/nod-ai/SHARK-Platform/releases/expanded_assets/dev-wheels

Target: next week (by Nov 8)

This will get us pip install shark-platform

Backlog

Wider support for Python versions

@ScottTodd
Copy link
Member Author

Researching how to promote versions from dev/rc --> stable, without needing to rebuild wheels:

@ScottTodd
Copy link
Member Author

Nightly releases are now documented here: https://github.com/nod-ai/SHARK-Platform/blob/main/docs/nightly_releases.md

@ScottTodd
Copy link
Member Author

ScottTodd commented Nov 7, 2024

We're making good progress on this.

Latest detailed task list (in order of rollout):

Publish iree-base-compiler and iree-base-runtime version 2.9.0 to nightly and PyPI

Today

Update downstream projects to new package names and versions

Late today / tomorrow

Complete the packaging for shark-platform

Late today / tomorrow

  • Build shark-platform meta-package that pins explicit versions of iree-turbine, iree-base-compiler, and iree-base-runtime. Allow for patch versions to drift?
  • Start publishing shark-platform meta-package to dev wheels (nightly)
  • Set sharktank package deps during package build reliably. #440
  • Publish sharktank, shortfin, and shark-platform 2.9.0 packages to pypi

Finish 3.0.0 release

Next week

  • Update versions to 3.0.0 for candidate releases
  • Wait for release branch cut
  • Cut 3.0.0 releases for each package
  • Push all packages to PyPI
  • Finalize release notes and user documentation to use the PyPI packages

marbre pushed a commit that referenced this issue Nov 8, 2024
Progress on #400.

Switching the versions to be earlier than the planned 3.0.0 will let us
publish a 2.9.0 test release to PyPI and then increment the major
version once we are comfortable with the new release process. I plan on
deleting the existing 3.0.0 binaries that have been pushed to the
"dev-wheels" release.

(Yes, pre-releases are a thing:
https://packaging.python.org/en/latest/specifications/version-specifiers/#pre-releases,
but we want to trial the full release process)
@ScottTodd
Copy link
Member Author

I've been stuck all day trying to update iree-turbine to use the new iree-base-compiler and iree-base-runtime packages: iree-org/iree-turbine#258. There are new test failures that look meaningful.

Without that change, the iree-turbine package will still depend on the old IREE package names, so users will download both iree-compiler and iree-base-compiler packages. That is already happening today in some workflows here, due to #449.

We might actually be able to proceed with the redundant installs for a little bit, but I'm not sure what the implications will be.

@ScottTodd
Copy link
Member Author

Figured out all the test failures and pushed iree-turbine 2.9.0:

@ScottTodd
Copy link
Member Author

I'm going to call it for the day. Next steps for Monday:

Once we have that initially working, we can also add the shark-platform meta package that directly pins the versions of each package that we want, then do the same build -> publish to dev wheels -> push to pypi process for that package.

ScottTodd added a commit that referenced this issue Nov 11, 2024
…#477)

Progress on #400

This lets us take a release from
https://github.com/nod-ai/SHARK-Platform/releases/tag/dev-wheels and
"promote it" for publishing to https://pypi.org/ by turning the version
from `X.Y.ZrcYYYYMMDD` to simply `X.Y.Z`. The script is forked from the
one in IREE I added last week:
iree-org/iree#19067.

More steps like
https://iree.dev/developers/general/release-management/#promoting-a-candidate-to-stable
and scripting like
https://github.com/iree-org/iree/blob/main/build_tools/python_deploy/pypi_deploy.sh
will follow.
@ScottTodd
Copy link
Member Author

Initial 2.9.0 releases of all packages have been published to PyPI. More work remains to get the process running smoothly, but we should have enough for testing using standard pip commands with no extra package index or source builds.

ScottTodd added a commit that referenced this issue Nov 15, 2024
Progress on #400.

This scripting allows us to publish .whl files from
https://github.com/nod-ai/SHARK-Platform/releases/tag/dev-wheels to
[PyPI](https://pypi.org/). Here are the basic steps:

1. Download wheels for a specific pre-release (e.g. `2.9.1rc20241114`)
2. Edit the versions in the downloaded wheels to remove the `rcYYYYMMDD`
suffix
3. Build the `shark-ai` meta package using the versions in those whls
(NOTE: currently this uses the versions _in the source tree_, see below)
4. Upload all wheels to PyPI

Logs of this running:
https://gist.github.com/ScottTodd/9c7418d5bbbebc8aea72a39bc2ac37b0 (to
push 2.9.1 to PyPI)

The new `pypi_deploy.sh` script is based on the similar script we
maintain in IREE:
https://github.com/iree-org/iree/blob/main/build_tools/python_deploy/pypi_deploy.sh
. The `README.md` file is also forked from IREE.

Known sharp edges with the publishing process:

* This currently mixes local information (versions from the source tree
where this is running) with remote information (versions from the
nightly release packages). Publishing nightly meta packages will let us
simplify and make this safer to run from arbitrary working trees
* The local build of the shark-ai meta package copies _all_ files in
`shark-ai/build_tools/wheelhouse/` to the working directory that gets
sent to `twine upload *`. If there are preexisting files in that
directory they will be published.
* The step that downloads releases from GitHub uses `pip download` so it
can leverage PyPI's version resolution logic, but I couldn't figure out
a way to download 3.13t wheels without running a 3.13t python
interpreter. I happen to have 3.13t installed on my system, but we
shouldn't require that in the scripting for all release engineers. We
could try using the `gh` tool as in IREE, if we properly filter the
download to just the version we want:
https://github.com/iree-org/iree/blob/9eaa4ef7d6b439d8c444b533beddd82146578e25/build_tools/python_deploy/pypi_deploy.sh#L69-L72
(that has one release per nightly, while here we have a single release
shared between all nightlies)

---------

Co-authored-by: Marius Brehler <[email protected]>
@ScottTodd
Copy link
Member Author

ScottTodd commented Nov 15, 2024

Steps for 3.0.0 release next week:

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

No branches or pull requests

2 participants