-
Notifications
You must be signed in to change notification settings - Fork 7.1k
wanda python-agnostic ray-cpp wheel (py3-none tag)(x86_64) #59969
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
base: andrew/revup/master/ray-wheel
Are you sure you want to change the base?
wanda python-agnostic ray-cpp wheel (py3-none tag)(x86_64) #59969
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces Wanda-based builds for Ray C++ wheels on x86_64, adding new CI configurations and Dockerfiles. The changes are well-structured, but there are opportunities to improve maintainability and ensure correctness across different Python versions. My review includes suggestions to refactor the Buildkite configuration to reduce duplication and to address a potential issue with hardcoded Python dependency files in the Wanda configuration.
| - name: ray-cpp-core-build | ||
| label: "wanda: cpp core py{{matrix}} (x86_64)" | ||
| wanda: ci/docker/ray-cpp-core.wanda.yaml | ||
| matrix: | ||
| - "3.10" | ||
| - "3.11" | ||
| - "3.12" | ||
| env: | ||
| PYTHON_VERSION: "{{matrix}}" | ||
| ARCH_SUFFIX: "" | ||
| HOSTTYPE: "x86_64" | ||
| MANYLINUX_VERSION: "260103.868e54c" | ||
| tags: | ||
| - release_wheels | ||
| - oss | ||
|
|
||
| - name: ray-cpp-wheel-build | ||
| label: "wanda: cpp wheel py{{matrix}} (x86_64)" | ||
| wanda: ci/docker/ray-cpp-wheel.wanda.yaml | ||
| matrix: | ||
| - "3.10" | ||
| - "3.11" | ||
| - "3.12" | ||
| env: | ||
| PYTHON_VERSION: "{{matrix}}" | ||
| ARCH_SUFFIX: "" | ||
| HOSTTYPE: "x86_64" | ||
| MANYLINUX_VERSION: "260103.868e54c" | ||
| tags: | ||
| - release_wheels | ||
| - linux_wheels | ||
| - oss | ||
| depends_on: | ||
| - ray-core-build | ||
| - ray-cpp-core-build | ||
| - ray-java-build | ||
| - ray-dashboard-build | ||
|
|
||
| # Upload cpp wheels to S3 | ||
| # Gating: only on releases/* OR (master AND nightly) | ||
| - label: ":s3: upload: cpp wheel py{{matrix}} (x86_64)" | ||
| key: linux_cpp_wheels_upload | ||
| instance_type: small | ||
| commands: | ||
| - ./ci/build/extract_wanda_wheels.sh ray-cpp-wheel-py{{matrix}} --upload | ||
| matrix: | ||
| - "3.10" | ||
| - "3.11" | ||
| - "3.12" | ||
| depends_on: | ||
| - ray-cpp-wheel-build | ||
| tags: | ||
| - release_wheels | ||
| - skip-on-premerge | ||
| - oss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's significant duplication in the newly added build steps. The matrix for Python versions and the env configuration are repeated. To improve maintainability and reduce redundancy, consider using YAML anchors and aliases.
For example, you could define:
x-python-versions: &python-versions
- "3.10"
- "3.11"
- "3.12"
x-cpp-build-env: &cpp-build-env
PYTHON_VERSION: "{{matrix}}"
ARCH_SUFFIX: ""
HOSTTYPE: "x86_64"
MANYLINUX_VERSION: "260103.868e54c"And then reference them in your build steps:
- name: ray-cpp-core-build
...
matrix: *python-versions
env: *cpp-build-env
- name: ray-cpp-wheel-build
...
matrix: *python-versions
env: *cpp-build-env
- label: ":s3: upload: cpp wheel py{{matrix}} (x86_64)"
...
matrix: *python-versionsThis would make the configuration cleaner and easier to update in the future.
| - java/dependencies.bzl | ||
| - release/BUILD.bazel | ||
| - release/requirements.txt | ||
| - release/requirements_py310.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration hardcodes release/requirements_py310.txt as a source file. However, the build matrix in .buildkite/build.rayci.yml includes Python 3.10, 3.11, and 3.12. Using Python 3.10-specific requirements for 3.11 and 3.12 builds might lead to dependency issues if there are version-specific packages.
If different Python versions require different dependencies, consider making this path dynamic based on the Python version. For example, if the build system supports it, you could use a variable like release/requirements_py$PYTHON_VERSION.txt and ensure corresponding files exist for each Python version.
bf5b228 to
ed903b7
Compare
8a4bdf5 to
a0b03e9
Compare
21500cc to
cf7cab6
Compare
a0b03e9 to
32347fa
Compare
8d1057a to
d8901f7
Compare
32347fa to
9074421
Compare
|
Verifying cpp wheel found no diffs between the old and this method: Remote URL : f6c2b5f Local wheel: 029272617770.dkr.ecr.us-west-2.amazonaws.com/rayproject/citemp@sha256:922a6d572dc2508d00cf247487facb2cbe918d3c924bc00ff53fd99726af5eb3 |
d8901f7 to
9e43825
Compare
9074421 to
1b2c341
Compare
9e43825 to
6801f72
Compare
1b2c341 to
05785cb
Compare
The ray-cpp wheel contains only C++ headers, libraries, and executables with no Python-specific code. Previously we built 4 identical wheels (one per Python version: cp310, cp311, cp312, cp313), wasting CI time and storage. This change produces a single wheel tagged py3-none-manylinux2014_* that works with any Python 3.x version. Changes: - Add ray-cpp-core.wanda.yaml and Dockerfile for cpp core - Add ray-cpp-wheel.wanda.yaml for cpp wheel builds - Add ci/build/build-ray-cpp-wheel.sh for Python-agnostic wheel builds - Add RayCppBdistWheel class to setup.py that forces py3-none tags (necessary because BinaryDistribution.has_ext_modules() causes bdist_wheel to use interpreter-specific ABI tags by default) - Update ray-cpp-wheel.wanda.yaml to build single wheel per architecture - Update .buildkite/build.rayci.yml to remove Python version matrix for cpp wheel build/upload steps Topic: ray-cpp-wheel Relative: ray-wheel Signed-off-by: andrew <[email protected]>
6801f72 to
9834ea3
Compare
05785cb to
37410f9
Compare
2a36172 to
b81d4cb
Compare
|
Converting to draft. Apologies for the new Codeowner pings |
|
Validation of commit f6c2b5f for this diff for this looked great!
|
The ray-cpp wheel contains only C++ headers, libraries, and executables
with no Python-specific code. Previously we built 4 identical wheels
(one per Python version: cp310, cp311, cp312, cp313), wasting CI time
and storage.
This change produces a single wheel tagged py3-none-manylinux2014_*
that works with any Python 3.x version.
Changes:
(necessary because BinaryDistribution.has_ext_modules() causes
bdist_wheel to use interpreter-specific ABI tags by default)
for cpp wheel build/upload steps
Topic: ray-cpp-wheel
Relative: ray-wheel
Signed-off-by: andrew [email protected]