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

update scikit-build-core floors, set a minimum version, address deprecation warnings #58

Closed
15 tasks done
jameslamb opened this issue May 2, 2024 · 17 comments
Closed
15 tasks done
Assignees

Comments

@jameslamb
Copy link
Member

jameslamb commented May 2, 2024

Description

The PRs for #2 switched most RAPIDS projects' build backends to scikit-build-core.

Across RAPIDS repos, we have the following mix of conditions in pyproject.toml today:

  • pin of scikit-build-core[pyproject]>=0.7.0 (raft pyproject.toml example)
  • no minimum-version set in the [tool.scikit-build-core] table in pyproject.toml

Taken together, that means "use the latest scikit-build-core newer than 0.7.0 at build time, and opt in to all of its newest non-experimental behaviors".

As a result of that mix, these warnings that have started showing up in build logs could eventually become errors:

WARNING: Use cmake.version instead of cmake.minimum-version with scikit-build-core >= 0.8

(example build link)

To prevent that happening unexpectedly and to provide a bit more stability, I think we should pursue the following across all RAPIDS repos:

  1. switch from cmake.minimum-version to cmake.version in [tool.scikit-build-core] table in pyproject.toml
  2. bump our scikit-build-core floor to the latest release of scikit-build-core
  3. set a minimum-version (minimum scikit-build-core version) in the [tool.scikit-build-core] table in pyproject.toml

Benefits of this work

Reduces the risk of a scikit-build-core release causing an all-RAPIDS-wheels-builds-are-broken-at-the-same-time type of event.

Removes a source of deprecation warnings from logs, reducing a bit of noise and improving the usefulness of build logs for debugging purposes.

Approach

If we agree to do this, it'd be a good candidate for rapids-reviser. Modify the scikit-build-core floor in dependencies.yaml and re-run rapids-dependency-file-generator, and the make the other edits in pyproject.toml files diretly.

Notes

Why do we need a floor on the dependency AND to set minimum-version?

See https://scikit-build-core.readthedocs.io/en/latest/configuration.html#minimum-version-defaults.

Like CMake, scikit-build-core's minimum-version configuration isn't just a constraint that's there for package managers or to raise an exception if you have a too-old version.

When scikit-build-core introduces new behaviors, it will sometimes gate them behind an "only do this if minimum-version>={something}" type of condition.

For example: https://github.com/scikit-build/scikit-build-core/blob/f6ed5a28fc85e621b03d984011d17def888ee0db/src/scikit_build_core/build/metadata.py#L41-L45

Tasks

Preview Give feedback

other items related to updating scikit-build-core

Preview Give feedback
@vyasr
Copy link
Contributor

vyasr commented May 3, 2024

  1. The cmake.minimum-version (and ninja.minimum-version, for that matter) changes happened at our request, see Exception raised during wheel build. scikit-build/scikit-build-core#571 (comment) and Support complete version specification syntax for CMake and ninja versions scikit-build/scikit-build-core#583. I agree that we should update those now. If we are going to update them, we should consider whether we ought to also follow scikit-build-core's recommendation to remove these entirely from the build-system.requires table. We previously decided against that, in large part because this more precise version selection constraint was missing.
  2. I don't particularly feel the need to bump up our floor to the latest scikit-build-core version, but I'm fine with doing so if you'd like. We'll need to bump up to at least 0.8 to be able to make the above change, anything beyond that is fine with me but not strictly necessary.
  3. I definitely agree that we should do this.

@vyasr
Copy link
Contributor

vyasr commented May 16, 2024

In addition to updating RAPIDS projects that use SKBC to build, we should also make sure to update the samples in dfg (see rapidsai/dependency-file-generator#98).

@jameslamb
Copy link
Member Author

This has new urgency because scikit-build-core just release a v0.10.0 which changed the handling of cmake.minimum-version in a way that will breaks RAPIDS repos.

notes: https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0

@henryiii
Copy link

henryiii commented Aug 6, 2024

Details on what broke? cmake.minimum-version shouldn't change at all if you don't change minimum-version (and minimum-version has to be set below some value like .8 in order to use the old cmake.minimum-version instead of cmake.version in the first place (minus a warning about using it appearing if it's not set at all)).

@jameslamb
Copy link
Member Author

Sorry @henryiii , I'll have more details for you in a few minutes. We haven't actually observed the new release breaking anything, so it was careless of me to say "will breaks RAPIDS repos." I think "might" would have been more appropriate.

In short... we don't set minimum-version and so always are on the latest scikit-build-core's behavior (something I hoped to change with this issue we're talking on, but which we just haven't gotten to across RAPIDS yet). We saw the release notes for the new scikit-build-core==0.10.0 and drew some conclusions about how the automatic CMake version detection would interact with our repos.

Those conclusions might not have been right. I've put up rapidsai/rmm#1638 to test our assumptions and try to get more information about the actual impact.

@bdice
Copy link
Contributor

bdice commented Aug 6, 2024

Conversation moved to here (we do see CI failures, and are discussing the root causes here): rapidsai/rmm#1637 (comment)

@jakirkham
Copy link
Member

Thanks James! 🙏

Appreciate you getting these PRs started

Have moved this issue to in progress to reflect that

@henryiii
Copy link

henryiii commented Aug 7, 2024

FYI, you can set:

[tool.scikit-build]
minimum-version = "build-system.requires"

To single-source the minimum version from the scikit-build-core>=0.10.

@jakirkham
Copy link
Member

Thanks Henry! 🙏

That's a nice addition. Noticing this got added in 0.10.0 😄

Linking the docs for reference

@henryiii
Copy link

henryiii commented Aug 7, 2024

It's also at https://iscinumpy.dev/post/scikit-build-core-0-10/.

jakirkham added a commit to rapidsai/pynvjitlink that referenced this issue Aug 7, 2024
…100)

As pointed out by Henry (
rapidsai/build-planning#58 (comment)
), we can configure `scikit-build-core` to retrieve the minimum version
from `build-system.requires`

This is also mentioned in:

* [This blogpost]( https://iscinumpy.dev/post/scikit-build-core-0-10/ )
* [The scikit-build-core docs](
https://scikit-build-core.readthedocs.io/en/latest/configuration.html#minimum-version-defaults
)
@jameslamb
Copy link
Member Author

Thanks @henryiii , really nice feature! I've just made that change on all the PRs linked in the task list at the top of this issue. If those are merged, then RAPIDS will be on scikit-build-core >= 0.10 and using minimum-version = "build-system.requires".

trxcllnt pushed a commit to rapidsai/devcontainers that referenced this issue Aug 7, 2024
Proposes switching from `SKBUILD_CMAKE_VERBOSE` to
`SKBUILD_BUILD_VERBOSE` in wheel-building scripts in
`rapids-build-utils`.

Setting `SKBUILD_CMAKE_VERBOSE` in the environment causes an unavoidable
build-time exception when using `scikit-build-core>=0.10.0` and setting
`minimum-version = "0.10.0"` in `scikit-build-core`.

```text
ERROR: Cannot set cmake.verbose if minimum-version is set to 0.10 or higher
```

([build
link](https://github.com/rapidsai/rmm/actions/runs/10274129734/job/28430178007?pr=1637#step:7:1878))

See
https://scikit-build-core.readthedocs.io/en/latest/configuration.html#verbosity

> Changed in version 0.10: cmake.verbose was renamed to build.verbose.

## Notes for Reviewers

For more context, see the conversation on that PR and
rapidsai/build-planning#58.
rapids-bot bot pushed a commit to rapidsai/wholegraph that referenced this issue Aug 8, 2024
…rsion (#203)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - https://github.com/jakirkham

URL: #203
rapids-bot bot pushed a commit to rapidsai/rmm that referenced this issue Aug 8, 2024
`cmake.minimum-version` has been deprecated since `scikit-build-core` 0.8, and is now causing conflicts in 0.10 due to its attempts to auto-detect `cmake.version` from `CMakeLists.txt`. Bump the minimum `scikit-build-core` to 0.10 and use the suggested `cmake.version`.

Contributes to rapidsai/build-planning#58

Authors:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)
  - James Lamb (https://github.com/jameslamb)
  - https://github.com/jakirkham

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - https://github.com/jakirkham

URL: #1637
rapids-bot bot pushed a commit to rapidsai/kvikio that referenced this issue Aug 8, 2024
…rsion (#430)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - https://github.com/jakirkham

URL: #430
rapids-bot bot pushed a commit to rapidsai/cudf that referenced this issue Aug 8, 2024
…rsion (#16503)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - https://github.com/jakirkham

URL: #16503
rapids-bot bot pushed a commit to rapidsai/ucxx that referenced this issue Aug 8, 2024
…rsion (#258)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - https://github.com/jakirkham

URL: #258
@jakirkham
Copy link
Member

Reviewed and merged a good chunk of these

There are a handful that are still running CI or have unrelated CI errors that need investigation

rapids-bot bot pushed a commit to rapidsai/cuvs that referenced this issue Aug 8, 2024
…rsion (#280)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - https://github.com/jakirkham

URL: #280
@jameslamb
Copy link
Member Author

Thanks for helping to move this forward @jakirkham !

I've checked the statuses this morning and all the remaining one haves unrelated CI failures. Will keep checking and updating them.

rapids-bot bot pushed a commit to rapidsai/raft that referenced this issue Aug 8, 2024
…rsion (#2406)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - https://github.com/jakirkham

URL: #2406
rapids-bot bot pushed a commit to rapidsai/cuml that referenced this issue Aug 9, 2024
…rsion (#6012)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)
  - Dante Gama Dessavre (https://github.com/dantegd)

Approvers:
  - https://github.com/jakirkham

URL: #6012
rapids-bot bot pushed a commit to rapidsai/cugraph that referenced this issue Aug 9, 2024
…rsion (#4597)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Mike Sarahan (https://github.com/msarahan)

URL: #4597
@vyasr
Copy link
Contributor

vyasr commented Aug 12, 2024

@jameslamb is rapidsai/cuspatial#1430 all that's left before we can close this?

@jameslamb
Copy link
Member Author

is rapidsai/cuspatial#1430 all that's left before we can close this?

yes

rapids-bot bot pushed a commit to rapidsai/cuspatial that referenced this issue Aug 12, 2024
…rsion (#1430)

Contributes to rapidsai/build-planning#58.

`scikit-build-core==0.10.0` was released today (https://github.com/scikit-build/scikit-build-core/releases/tag/v0.10.0), and wheel-building configurations across RAPIDS are incompatible with it.

This proposes upgrading to that version and fixing configuration here in a way that:

* is compatible with that new `scikit-build-core` version
* takes advantage of the forward-compatibility mechanism (`minimum-version`) that `scikit-build-core` provides, to reduce the risk of needing to do this again in the future

Authors:
  - James Lamb (https://github.com/jameslamb)
  - Bradley Dice (https://github.com/bdice)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - https://github.com/jakirkham

URL: #1430
@jameslamb
Copy link
Member Author

That cuspatial PR is now merged, so this is complete.

@jakirkham
Copy link
Member

Thanks all! 🙏

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

6 participants