Skip to content

Commit

Permalink
Tiny update after huggingface#34383 (huggingface#34404)
Browse files Browse the repository at this point in the history
* update

* update

* update

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
  • Loading branch information
2 people authored and BernardZach committed Dec 5, 2024
1 parent e88fb22 commit e4972e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions utils/check_bad_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down
3 changes: 2 additions & 1 deletion utils/notification_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ def payload(self) -> str:
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")
Expand Down
2 changes: 2 additions & 0 deletions utils/process_bad_commit_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
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:
Expand Down

0 comments on commit e4972e8

Please sign in to comment.