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

Fix copies main ci #29979

Merged
merged 4 commits into from
Apr 1, 2024
Merged

Fix copies main ci #29979

merged 4 commits into from
Apr 1, 2024

Conversation

ArthurZucker
Copy link
Collaborator

What does this PR do?

After #29909

f"Tried to split a class or function. It did not work. Error comes from line {start_index}: ```\n"
+ "".join(lines[start_index:end_index])
f"Tried to split a class or function. It did not work. Error comes from line {start_index}: \n```\n"
+ "".join(lines[start_context:end_context])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just adding some context can help a lot!

def test_flash_attn_2_inference_padding_right(self):
def test_flash_attn_2_inference_equivalence_right_padding(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actual fix

@ArthurZucker ArthurZucker marked this pull request as ready for review April 1, 2024 09:51
utils/check_copies.py Outdated Show resolved Hide resolved
@ArthurZucker ArthurZucker requested a review from gante April 1, 2024 10:04
Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

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

Thank you for the fix 🙏 (Extra context is great!)

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

@ArthurZucker ArthurZucker merged commit fa2c49b into main Apr 1, 2024
19 checks passed
@ArthurZucker ArthurZucker deleted the fix-copies-main-ci branch April 1, 2024 10:43
observed_obj_name = re_pattern.search(observed_code_header).groups()[0]
except Exception:
raise ValueError(
"Tried to split a class or function. It did not work. Error comes from: \n```\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The error message is a bit confusing here. The re_pattern is used to extract the class or function name, not to split the blocks (unlike the above one)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

feel free to update it. 😄

ArthurZucker added a commit that referenced this pull request Apr 22, 2024
* fix copies

* nit

* style

* Update utils/check_copies.py
itazap pushed a commit that referenced this pull request May 14, 2024
* fix copies

* nit

* style

* Update utils/check_copies.py
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