Skip to content

Comments

Fix copies main ci#29979

Merged
ArthurZucker merged 4 commits intomainfrom
fix-copies-main-ci
Apr 1, 2024
Merged

Fix copies main ci#29979
ArthurZucker merged 4 commits intomainfrom
fix-copies-main-ci

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!

@pytest.mark.flash_attn_test
@slow
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
@ArthurZucker ArthurZucker requested a review from gante April 1, 2024 10:04
Copy link
Contributor

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

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