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

Add pre-commit configuration #1467

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

akx
Copy link
Contributor

@akx akx commented Feb 15, 2024

What does this PR do?

This PR adds a pre-commit configuration, so developers may opt in to running ruff and ruff-format as a pre-commit hook.

Should reduce the need for "fix lint" commits and check_code_quality CI failures.

Sibling of huggingface/accelerate#2451

@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.

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thanks ! In principle I am ok with this PR as we have it on other libs as well, e.g. TRL !
I would like to hear what @BenjaminBossan & @pacman100 think, I agree pre-commit is quite convenient

@BenjaminBossan
Copy link
Member

I had some issues with pre-commit in the past. Some probably won't apply here (e.g. it being slow) but in the end, everyone is free to choose if they want to activate them or not, so I see no real harm (there is a small maintenance cost of keeping the config in sync).

@BenjaminBossan BenjaminBossan merged commit 47c4d95 into huggingface:main Feb 19, 2024
14 checks passed
@akx akx deleted the pre-commit branch February 19, 2024 16:51
BenjaminBossan pushed a commit to BenjaminBossan/peft that referenced this pull request Mar 14, 2024
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.

4 participants