Skip to content

Conversation

cyyever
Copy link
Contributor

@cyyever cyyever commented Sep 19, 2025

No description provided.

@BenjaminBossan
Copy link
Member

Right now, we don't test PEFT with Python 3.13:

python-version: ["3.9", "3.10", "3.11", "3.12"]

Our test infrastructure is already strained, so we don't add a 5th Python version. Once Python 3.9 is EOL, which is in October, we'll remove it and add Python 3.13 to the test matrix. That said, I'm pretty sure that PEFT will work with 3.13, but I would only add it as a classifier once it's tested in CI.

@cyyever
Copy link
Contributor Author

cyyever commented Sep 19, 2025

@BenjaminBossan Could I add 3.13 and drop 3.9 in this PR so that it can be merged once 3.9 is out.

@BenjaminBossan BenjaminBossan marked this pull request as draft September 19, 2025 09:53
@BenjaminBossan
Copy link
Member

@cyyever We can make this the "Drop Python 3.9, add 3.13" PR. I turned it into a draft, as we only want to merge it in Oct.

There are probably more things that could be added for this transition, e.g. removing a lot of from __future__ import annotations imports, but this can be done separately.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@cyyever cyyever changed the title Add python3.13 classifier to setup.py Drop Python 3.9, add 3.13 Sep 19, 2025
@BenjaminBossan
Copy link
Member

Okay, so we get the green tick for Ubuntu, but CI fails for MacOS and Windows. Honestly, MacOS is a lost cause at this point and I think it's fine to just exclude it from the test matrix.

For Windows, the issue appears to be the low numpy version, which is installed due to this step:

- name: Downgrade numpy on MacOS and Windows
# TODO: remove numpy downgrade on MacOS & Windows once torch fixes numpy 2.0 issue
shell: bash
if: matrix.os == 'windows-latest' || matrix.os == 'macos-13'
run: |
pip install --force-reinstall -U "numpy<2.0.0"

Based on some testing (#2791), it can probably be removed completely. If not, we can condition it on the Python version.

@BenjaminBossan
Copy link
Member

@cyyever Would you like to add the changes I proposed above?

@cyyever
Copy link
Contributor Author

cyyever commented Sep 29, 2025

@BenjaminBossan Do you mean removing the section in peft/.github/workflows/tests.yml?

@BenjaminBossan
Copy link
Member

Yes, removing it and also adding an exclusion rule for MacOS + Python 3.13.

@cyyever
Copy link
Contributor Author

cyyever commented Sep 29, 2025

@BenjaminBossan Let's try removing it.

Signed-off-by: Yuanyuan Chen <[email protected]>
Signed-off-by: Yuanyuan Chen <[email protected]>
@BenjaminBossan
Copy link
Member

Generally, this seems to work. The CI is very flaky, merging with/rebasing on the latest main will most likely fix that.

Also, let's add an exclusion rule after this line for MacOS + Python 3.13:

        exclude:
          - os: macos-latest
            python-version: "3.13"

Signed-off-by: Yuanyuan Chen <[email protected]>
@cyyever
Copy link
Contributor Author

cyyever commented Sep 29, 2025

@BenjaminBossan Done

@cyyever cyyever marked this pull request as ready for review September 30, 2025 01:01
Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks for this PR to add Python 3.13 to the list of supported Python versions and remove 3.9. If I understand this table correctly, Python 3.9 is EOL on Oct 1, so we can merge this PR tomorrow :)

@BenjaminBossan BenjaminBossan merged commit 815956b into huggingface:main Oct 1, 2025
35 of 38 checks passed
@cyyever cyyever deleted the py313 branch October 1, 2025 10:44
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

Successfully merging this pull request may close these issues.

3 participants