Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GA to Lint + Format MegaBlocks#131

Merged
eitanturok merged 46 commits into
databricks:mainfrom
eitanturok:eitan-pre-commit
Aug 9, 2024
Merged

GA to Lint + Format MegaBlocks#131
eitanturok merged 46 commits into
databricks:mainfrom
eitanturok:eitan-pre-commit

Conversation

@eitanturok

@eitanturok eitanturok commented Aug 1, 2024

Copy link
Copy Markdown
Contributor

This PR lints and formats MegaBlocks. Specifically, we:

  • Create a .pre-commit-config.yaml with all of the same hooks as composer except for pyright (will be done in a subsequent PR).
  • Formatted + Linted all code in MegaBlocks by running the pre-commit hooks. Changes include
    • adding a license
    • sorting imports
    • removing unusued imports
    • following style conventions in code
    • following style conventions in docstring
    • lint all python code
    • lint all yaml code
  • Added a Github Action to automatically perform code formatting + linting

Note: I made all the .sh files in the exp directory executable as per the check-executables-have-shebangs hook.

@eitanturok eitanturok requested review from mihir-db and vchiley August 1, 2024 15:16
@eitanturok eitanturok marked this pull request as ready for review August 1, 2024 15:17
@eitanturok eitanturok requested review from b-chu and dakinggg August 1, 2024 15:17
@eitanturok eitanturok requested a review from b-chu August 6, 2024 20:13
@eitanturok

eitanturok commented Aug 6, 2024

Copy link
Copy Markdown
Contributor Author

I addressed all of your comments @b-chu except for taking care of fixing the __init__.py files in MegaBlocks.

All the tests pass, so it seems like this isn't such a bad issue...

@b-chu b-chu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix the init files. Names should definitely match

@eitanturok

Copy link
Copy Markdown
Contributor Author

I also added a contributing guide, style guide, and Pull_REQUEST template, all initially taken from composer.

@eitanturok eitanturok requested a review from b-chu August 8, 2024 12:46

@mvpatel2000 mvpatel2000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you change license to Databricks? Otherwise LGTM, would also like @b-chu to approve since large PR

Comment thread .github/workflows/code-quality.yaml Outdated
Comment thread .github/workflows/pr-gpu.yaml Outdated

@b-chu b-chu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix all your file headers

@eitanturok

Copy link
Copy Markdown
Contributor Author

@mihir-db I changed the license.

@eitanturok eitanturok requested a review from b-chu August 8, 2024 20:10

@b-chu b-chu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR!

@eitanturok eitanturok merged commit 6adb1fb into databricks:main Aug 9, 2024
@eitanturok eitanturok deleted the eitan-pre-commit branch August 9, 2024 15:59
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