Skip to content

Fixing docstring linter #2163

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

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Fixing docstring linter #2163

merged 4 commits into from
Jan 15, 2025

Conversation

SalmanMohammadi
Copy link
Collaborator

Context

What is the purpose of this PR? Is it to

  • add a new feature
  • fix a bug
  • update tests and/or documentation
  • other (please add here)

I ran pre-commit autoupdate to update the repos we use in our pre-commit hooks.

     

                        .-------.
              *         | #     |    *
                        |_______|         *
                       _|=======|_             *
           *          [___________]
                       .'       `.   *   | /  
                      :   @   @   :     \|/_
                      :     <     :     //   
             \~_s~-~s~s`._`...'_.'     //      *
          *   `--~-~-~~s~/`"""'  `-.  //
                    /'/s/   _       `//
                   / /s/   (_)       /
                  ///s/     _        :  *
            *    ///s/     (_)      .'          *
                // |/`.           .'
             __//    .-''-------'`-.
              /|\  .'       _       `.      *
             / | \:        (_)        :
                 :          _          :
                 :         (_)         :
          *      :          _          :     *
                 :         (_)         :
                  :                   :
          ""'"""'""`.               .'"'"""'""'""
                   `-._       _.-'
                         `"""""'

Copy link

pytorch-bot bot commented Dec 17, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/2163

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit f75c7cd with merge base 9dae7f1 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 17, 2024
ValueError: if ``keys_to_pad`` is empty, or is not a list, or is not a subset of keys in the batch.
ValueError: if ``padding_idx`` is provided as a dictionary, but the keys are not identical to
``keys_to_pad``.
ValueError:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The docstring linter lints based on unique raises, so we document a single value error and each condition it will raise for. Annoyingly, I couldn't for the life of me get lists to properly render in the raises section.

This is what it looks like instead:

image

@RdoubleA RdoubleA merged commit fd95242 into pytorch:main Jan 15, 2025
17 checks passed
@SalmanMohammadi SalmanMohammadi deleted the fix_linter branch January 15, 2025 08:30
@RdoubleA RdoubleA mentioned this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants