Fix new failure reports not including anything other than tests/models/ (#37415)

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2025-04-10 14:47:23 +02:00 committed by GitHub
parent 1ae8d54b04
commit d9e76656ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -544,8 +544,11 @@ class Message:
if "https://github.com/huggingface/transformers/actions/runs" in line:
pattern = r"<(https://github.com/huggingface/transformers/actions/runs/.+?/job/.+?)\|(.+?)>"
items = re.findall(pattern, line)
elif "tests/models/" in line:
model = line.split("/")[2]
elif "tests/" in line:
if "tests/models/" in line:
model = line.split("/")[2]
else:
model = line.split("/")[1]
if model not in new_failed_tests:
new_failed_tests[model] = {"single-gpu": [], "multi-gpu": []}
for url, device in items: