Skip to content

Conversation

@mariosasko
Copy link
Contributor

Fix the example code block regex to avoid the so-called "catastrophic backtracking" scenario, which causes CI to hang. For the reproduction, check this commit from huggingface/datasets#4957 (notice the missing closing ```).

@mishig25
Copy link
Contributor

mishig25 commented Sep 14, 2022

note for myself: https://huggingface.co/docs/transformers/main/en/model_doc/bert#transformers.BertForSequenceClassification.forward.example-4 codeexample hashlink should be working

note for myself: be sure to check that match groups of changed regex are working as expected

mishig25 added a commit to huggingface/transformers that referenced this pull request Sep 19, 2022
Copy link
Contributor

@mishig25 mishig25 left a comment

Choose a reason for hiding this comment

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

lgtm!
tested it & works great!

@mishig25 mishig25 merged commit 433d755 into main Sep 19, 2022
@mishig25 mishig25 deleted the fix-example-codeblock-re branch September 19, 2022 12:44
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