-
Notifications
You must be signed in to change notification settings - Fork 76
Switch from yapf/pylint/isort to ruff #874
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
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
|
@fsschneider, sorry, there are some merge conflicts after I merged in the dropout refactoring. Could you help resolve the merge conflicts please? I think we just want to accept incoming changes from the dev branch and then reformat them with ruff. |
I believe I resolved them now. |
|
LGTM! |
This PR updates our codebase to use
rufffor linting and formatting, replacingyapf,pylint, andisort.ruffoffers the combined functionality of all three tools while being significantly faster.Previously, running
yapf,pylint, andisortlocally took ~1m 16s on my workstation.In contrast, running
rufftook ~0.14s on my workstation.ruff check && ruff format --checkIn GitHub Actions, the improvement is less dramatic due to tool installation times, but I observed roughly a 50% reduction in runtime.
Steps
ruffin GitHub Actions.ruff.ruffcode style.