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

enforce wheel size limits and README formatting in CI, put a ceiling on Cython dependency #2490

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

jameslamb
Copy link
Member

@jameslamb jameslamb commented Nov 13, 2024

Description

Contributes to rapidsai/build-planning#110

Proposes adding 2 types of validation on wheels in CI, to ensure we continue to produce wheels that are suitable for PyPI.

Also puts a ceiling on Cython to its latest stable release (<=3.0.11), to fix #2490 (comment). Work to relax that is tracked in (#2491).

@jameslamb jameslamb added 5 - DO NOT MERGE Hold off on merging; see PR for details improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 13, 2024
@jameslamb
Copy link
Member Author

jameslamb commented Nov 13, 2024

Seeing build issues like this when building pylibraft:

    Error compiling Cython file:
    ------------------------------------------------------------
    ...
  
        shape = (cai.shape[0], cai.shape[1] if len(cai.shape) == 2 else 1)
  
        return make_device_matrix_view[int64_t, int64_t, row_major](
  
            <int64_t*><uintptr_t>cai.data, shape[0], shape[1])
 
    cdef device_matrix_view[const_float, int64_t, row_major] \ 
    ^
 
    ------------------------------------------------------------
  
    /home/coder/raft/python/pylibraft/pylibraft/common/mdspan.pyx:203:0: Function signature does not match previous declaration

(build link)

Note that this is only happening in pip devcontainer builds, not in the other wheel builds of pylibraft here.

@vyasr
Copy link
Contributor

vyasr commented Nov 13, 2024

Pasting my message from Slack:

My guess is that that this is happening because the pip devcontainer is using the Cython 3.1 alpha, while the normal wheel builds are not. The alpha was released five days ago. I'm guessing there are some bugs in there that need sorting out. The issue is that (if you recall) our devcontainer builds install with --pre because of rapidsai/build-planning#85 (otherwise we could specify alpha versions explicitly for dask/distributed and not need the global --pre)

We should probably report a bug upstream if we can root cause this, but in the meantime raft may just have to introduce an upper bound. I wouldn't bother doing this globally in other RAPIDS packages unless we start seeing failures more broadly though; likely this is some edge case due to raft's complex templating, and it may even be that raft's Cython has a bug that the newer Cython version is catching while the old one didn't due to less strict parsing. I encountered that with cuml before and fixed a real bug.

@jameslamb
Copy link
Member Author

Thanks @vyasr ! It looks like adding the ceiling on Cython worked 🎉

Put up #2491 to track the work of relaxing that ceiling in the future.

Some CI jobs here are failing for what look like temporary issues, but I don't want to stop the in-progress C++ test job to restart everything, because those take several hours to run 😬

I'll keep checking back and hopefully we can get a clean CI run and then merge this.

@jameslamb jameslamb changed the title WIP: [DO NOT MERGE] enforce wheel size limits, README formatting in CI enforce wheel size limits, README formatting in CI Nov 13, 2024
@jameslamb jameslamb removed the 5 - DO NOT MERGE Hold off on merging; see PR for details label Nov 13, 2024
@jameslamb jameslamb marked this pull request as ready for review November 13, 2024 23:09
@jameslamb jameslamb requested review from a team as code owners November 13, 2024 23:09
@jameslamb jameslamb requested review from AyodeAwe and bdice and removed request for AyodeAwe November 13, 2024 23:09
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

One question / one comment. Overall it should be fine.

@@ -164,7 +164,7 @@ dependencies:
- output_types: [conda, requirements, pyproject]
packages:
- &cmake_ver cmake>=3.26.4,!=3.30.0
- cython>=3.0.0
- cython>=3.0.0,<=3.1.0a0
Copy link
Contributor

@bdice bdice Nov 14, 2024

Choose a reason for hiding this comment

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

Is this supposed to be strictly less than? (This appears several places.)

Suggested change
- cython>=3.0.0,<=3.1.0a0
- cython>=3.0.0,<3.1.0a0

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahhh yes!!! Thank you for catching this 🙈

Updated all of them in 4206485

]

# detect when package size grows significantly
max_allowed_size_compressed = '825M'
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, this size should decrease a lot with #2488.

Copy link
Member Author

Choose a reason for hiding this comment

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

🥳 hey awesome! We should decrease this in #2488 or some follow-up PR after.

@jameslamb jameslamb changed the title enforce wheel size limits, README formatting in CI enforce wheel size limits and README formatting in CI, put a ceiling on Cython dependency Nov 14, 2024
@jameslamb
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit a6712ba into rapidsai:branch-24.12 Nov 14, 2024
70 checks passed
@jameslamb jameslamb deleted the wheel-validation branch November 14, 2024 14:45
rapids-bot bot pushed a commit that referenced this pull request Nov 27, 2024
Following #2498, we can apply this feedback from #2490: #2490 (comment)

These changes are inspired by rapidsai/cuvs#469.

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

Approvers:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

URL: #2509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci improvement Improvement / enhancement to an existing function non-breaking Non-breaking change python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants