这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@BenjaminBossan
Copy link
Member

@BenjaminBossan BenjaminBossan commented Nov 10, 2025

Issues with pyproject.toml

Since the recent pytest v9 release, PEFT's pyproject.toml does not work anymore. This is because it mixes both new and old format new formats (ini_options), which is no longer allowed.

This PR fixes the issue by switching fully to the new format. Note that if a pytest version < 9.0.0 is used, the added pytest options will be ignored. Thus please update to 9.0.0+.

Context: https://github.com/pytest-dev/pytest/releases/tag/9.0.0

Example of failing CI: https://github.com/huggingface/peft/actions/runs/19218760387/job/54932519290#step:5:14

Issues with unittest.skip

Since pytest v9, unittest.skip raises an error instead of just skipping the corresponding test (see these errors). As of writing this, it is unclear if this will be fixed or not:

pytest-dev/pytest#13895

To avoid the error, we now use pytest.mark.skip insted of unittest.skip / unittest.skipUnless.

Tangential changes

  1. Remove a few inheritances from unittest.TestCase that were unnecessary
  2. Skip the whole test_gpu_examples.py module if no accelerator is available (faster than checking each class/function individually)

Since the recent pytest v9 release, PEFT's pyproject.toml does not work
anymore. This is because it mixes both new and old format new
formats (ini_options), which is no longer allowed.

This PR fixes the issue by switching fully to the new format. Note that
if a pytest version < 9.0.0 is used, the added pytest options will be
ignored. Thus please update to 9.0.0+.

Context: https://github.com/pytest-dev/pytest/releases/tag/9.0.0
@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.

@BenjaminBossan BenjaminBossan changed the title CI: Update pyproject.toml because of pytest v9 CI: Fix issues caused by pytest v9 Nov 10, 2025
@BenjaminBossan BenjaminBossan merged commit 7d4c9fd into huggingface:main Nov 10, 2025
13 checks passed
@BenjaminBossan BenjaminBossan deleted the CI-update-pyproject-pytest-9 branch November 10, 2025 16:36
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