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

Build nightly shark-ai -package #535

Merged
merged 7 commits into from
Nov 18, 2024
Merged

Conversation

marbre
Copy link
Member

@marbre marbre commented Nov 15, 2024

Refactors the scripts so that a version suffix can be passed as an argument. This is used to generate the suffix only once in the workflow instead of computing it in multiple scripts and partly scattered across different steps (write_requirements.py runs in a different step). Further adds dependencies to IREE packages also for nightly shark-ai builds.

Requires #519.

@marbre marbre requested a review from ScottTodd November 15, 2024 13:29
Copy link
Member

Choose a reason for hiding this comment

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

  1. Can you run this on your fork and share the resulting outputs so we can test?
  2. Is the nightly shark-ai whl ready to promote to pypi with just dropping rcYYYYMMDD from its own version, or are deeper changes to the package needed for that?

Copy link
Member Author

@marbre marbre Nov 15, 2024

Choose a reason for hiding this comment

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

The generated requirements file would still be different:

requirements.txtfor nightly release

iree-base-compiler
iree-base-runtime
iree-turbine
shortfin==3.0.0rc20241115

stable.txtfor nightly release

iree-base-compiler==3.0.*
iree-base-runtime==3.0.*
iree-turbine==3.0.*
shortfin==3.0.0

Copy link
Member Author

Choose a reason for hiding this comment

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

Running on my fork, you get the following releases (screenshot):
shark-ai-dev-weel20241118

The METADATA for the SHARK AI meta package is

Metadata-Version: 2.1
Name: shark-ai
Version: 2.9.2rc20241118
Summary: SHARK AI meta package
Author: SHARK Authors
License: Apache-2.0
Project-URL: Repository, https://github.com/nod-ai/shark-ai
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Requires-Dist: iree-base-compiler
Requires-Dist: iree-base-runtime
Requires-Dist: iree-turbine
Requires-Dist: shortfin==2.9.2
Provides-Extra: apps
Requires-Dist: shortfin[apps]; extra == "apps"
Provides-Extra: onnx
Requires-Dist: iree-base-compiler[onnx]; extra == "onnx"

# SHARK AI meta package

Meta package to install `shortfin` and compatible IREE packages.

Copy link
Member

Choose a reason for hiding this comment

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

What would it take to make a nightly SHARK AI be directly promotable to PyPI? I want consistency and predictability for packaging, so users can switch channels easily and release engineers can follow simple steps without needing to think too hard about special cases.

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'd need to look into what the current scripts do, but as a wheel essentially is just a zip-file, we probably can unpack (ourselves?) to edit the Requires-Dist:entries in the METADATA file (and update the hash in RECORDafterwards).

This adds `iree-base-compiler`, `iree-base-runtime` and `iree-turbine`
as dependencies written to the generated `requirements.txt` for nighly
builds. Note that no explicit versions get pinned as it is the case for
stable releases! Rational behind is that the versions might not align as
it is required for stable releases.
The sharktank package was temporarily removed from the dependencies.
@marbre marbre requested a review from ScottTodd November 18, 2024 12:38
@marbre marbre enabled auto-merge (squash) November 18, 2024 23:30
@marbre marbre merged commit e425eb6 into nod-ai:main Nov 18, 2024
4 of 5 checks passed
@marbre marbre deleted the shark-ai-nightly branch November 18, 2024 23:30
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.

2 participants