vllm icon indicating copy to clipboard operation
vllm copied to clipboard

[CI/Build] migrate static project metadata from setup.py to pyproject.toml

Open dtrifiro opened this issue 1 year ago • 11 comments

Static metadata can be moved to pyproject.toml and removed from setup.py

dtrifiro avatar Sep 24 '24 11:09 dtrifiro

👋 Hi! Thank you for contributing to the vLLM project. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

github-actions[bot] avatar Sep 24 '24 11:09 github-actions[bot]

how does this affect the build process of ci, which uses python setup.py ?

youkaichao avatar Sep 24 '24 19:09 youkaichao

@youkaichao It should not. This is just moving static metadata from setup.py to pyproject.toml

Building wheels from this branch and main and looking at metadata doesn't show any difference:

gh pr checkout 8772
VLLM_TARGET_DEVICE=empty python setup.py bdist_wheel
# ^ creates `vllm-0.6.3.dev157+ge3bef869f.empty-py3-none-any.whl`
git checkout main
VLLM_TARGET_DEVICE=empty python setup.py bdist_wheel
# ^ creates `vllm-0.6.3.dev156+g07c11cf4d.empty-py3-none-any.whl`

# you can verify the wheel's generated metadata files:
ls **/*dist-info

Outputs:

vllm-0.6.3.dev156+g07c11cf4d.empty-py3-none-any/vllm-0.6.3.dev156+g07c11cf4d.empty.dist-info: entry_points.txt LICENSE METADATA RECORD top_level.txt WHEEL

vllm-0.6.3.dev157+ge3bef869f.empty-py3-none-any/vllm-0.6.3.dev157+ge3bef869f.empty.dist-info: entry_points.txt LICENSE METADATA RECORD top_level.txt WHEEL

You can compare files, and they're identical (except for the extra embedded license in METADATA in the dev157 build, which is this one)

dtrifiro avatar Oct 10 '24 13:10 dtrifiro

@dtrifiro do you plan to update this PR? It seems like a nice step towards removing setup.py

hmellor avatar Jan 15 '25 15:01 hmellor

@hmellor we will not be able to remove setup.py as we heavily rely on a custom build process. This PR aimed to move static metadata to pyproject.toml rather then remove setup.py entirely

dtrifiro avatar Jan 17 '25 10:01 dtrifiro

@simon-mo done.

Some requirements (optional requirements groups) are currently static but I left them in pyproject.yoml regardless for consistency, maybe this could be worth revisiting after https://github.com/vllm-project/vllm/pull/7525 is merged

dtrifiro avatar Feb 04 '25 10:02 dtrifiro

Build failures look unrelated

dtrifiro avatar Feb 05 '25 10:02 dtrifiro

@simon-mo can we merge this?

dtrifiro avatar Feb 07 '25 09:02 dtrifiro

This pull request has merge conflicts that must be resolved before it can be merged. Please rebase the PR, @dtrifiro.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

mergify[bot] avatar Feb 17 '25 11:02 mergify[bot]

setup.py starting to look a bit cleaner already, thanks!

NickLucche avatar Feb 17 '25 11:02 NickLucche

@simon-mo sorry to ping you again, but could we merge this?

dtrifiro avatar Feb 18 '25 10:02 dtrifiro

QQ: when we use python setup.py , will pyproject.toml still be read?

I'm thinking about this line:

https://github.com/vllm-project/vllm/blob/a02c86b4dd00f096b33499657f2d119be91cc9a6/Dockerfile#L115

youkaichao avatar Feb 18 '25 16:02 youkaichao

cc @dtrifiro

youkaichao avatar Feb 18 '25 16:02 youkaichao

@youkaichao yes.

dtrifiro avatar Feb 18 '25 16:02 dtrifiro