Skip to content

refactor: build wheels and conda packages using Python limited API#1027

Draft
gforsyth wants to merge 6 commits intorapidsai:mainfrom
gforsyth:limited_api
Draft

refactor: build wheels and conda packages using Python limited API#1027
gforsyth wants to merge 6 commits intorapidsai:mainfrom
gforsyth:limited_api

Conversation

@gforsyth
Copy link
Contributor

Moving cucim over to using the limited API as part of rapidsai/build-planning#42

Ops-Bot-Merge-Barrier: true

@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 13, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@gforsyth
Copy link
Contributor Author

/ok to test

@gforsyth gforsyth added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Feb 13, 2026
@gforsyth
Copy link
Contributor Author

/ok to test

2 similar comments
@gforsyth
Copy link
Contributor Author

/ok to test

@gforsyth
Copy link
Contributor Author

/ok to test

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Gil! 🙏

Had a few suggestions based on other PRs making similar changes (like pinning Python in tests correctly)

Also had some questions based on the errors we are seeing in CI and what else this PR might need to address them

rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-github cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-github python)
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name conda_python cucim --stable --cuda "$RAPIDS_CUDA_VERSION")")
Copy link
Member

Choose a reason for hiding this comment

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

Think we may not be installing everything we need here. Seeing the following missing module errors in CI:

FAILED tests/unit/clara/test_batch_decoding.py::TestBatchDecoding::test_batch_read_multiple_locations[testimg_tiff_stripe_4096x4096_256_jpeg] - ModuleNotFoundError: No module named 'cucim.clara._cucim'

Are we...?

  • Not uploading a package we need to the cache?
  • Missing downloading a package from the cache?
  • Not installing a third-party dependency we need?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, John!

I think all the errors come down to the package not getting built as an abi3 wheel for whatever reason -- the missing module errors are from trying to load (say) a cp312 version of an object when there's only a cp311 one available.

Going to poke at the builds locally and see where I'm missing a switch.


# echo to expand wildcard before adding `[extra]` requires for pip
rapids-pip-retry install "$(echo ${PYTHON_WHEELHOUSE}/cucim*.whl)[test]"
rapids-pip-retry install "$(echo "${PYTHON_WHEELHOUSE}"/cucim*.whl)[test]"
Copy link
Member

Choose a reason for hiding this comment

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

With the wheel case we see a different error on CI:

Looking in indexes: https://pip-cache.local.gha-runners.nvidia.com/simple, https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
ERROR: cucim_cu13-26.4.0a19-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl is not a supported wheel on this platform.

Are we...?

  • Installing the right wheel with this step
  • Generating the name correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're pulling down the right artifact, but the contents are incorrect (because we're generating them incorrectly).

Comment on lines 68 to 69
# repair wheels and write to the location that artifact-uploading code expects to find them
python -m auditwheel repair -w "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}" dist/*
Copy link
Member

Choose a reason for hiding this comment

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

It is possible this step needs to be changed based on how the wheels are now being built

@gforsyth gforsyth force-pushed the limited_api branch 2 times, most recently from 84c531f to 1142e7f Compare February 17, 2026 14:18
@gforsyth
Copy link
Contributor Author

/ok to test

Co-authored-by: jakirkham <jakirkham@gmail.com>
@gforsyth
Copy link
Contributor Author

Ahh, right, cucim doesn't use scikit-build-core, so settings flags isn't going to do anything. This one might be more involved

@gforsyth
Copy link
Contributor Author

cucim uses pybind11 which doesn't support the limited API: pybind/pybind11#5905

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants