Tiny update after #34383 (#34404)

* update

* update

* update

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2024-10-28 12:01:05 +01:00 committed by GitHub
parent fc465bb196
commit 9360f1827d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -75,6 +75,9 @@ def find_bad_commit(target_test, start_commit, end_commit):
`str`: The earliest commit at which `target_test` fails.
"""
if start_commit == end_commit:
return start_commit
create_script(target_test=target_test)
bash = f"""

View File

@ -547,7 +547,8 @@ class Message:
items = re.findall(pattern, line)
elif "tests/models/" in line:
model = line.split("/")[2]
new_failed_tests[model] = {"single-gpu": [], "multi-gpu": []}
if model not in new_failed_tests:
new_failed_tests[model] = {"single-gpu": [], "multi-gpu": []}
for url, device in items:
new_failed_tests[model][f"{device}-gpu"].append(line)
file_path = os.path.join(os.getcwd(), f"ci_results_{job_name}/new_model_failures.json")

View File

@ -64,6 +64,8 @@ if __name__ == "__main__":
for device, failed_tests in model_result.items():
failed_tests = [x for x in failed_tests if x["author"] == author or x["merged_by"] == author]
model_result[device] = failed_tests
_data[model] = {k: v for k, v in model_result.items() if len(v) > 0}
new_data_full[author] = {k: v for k, v in _data.items() if len(v) > 0}
# Upload to Hub and get the url
with open("new_model_failures_with_bad_commit_grouped_by_authors.json", "w") as fp: