Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save the list of new model failures #31013

Merged
merged 1 commit into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion utils/notification_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def get_reply_blocks(self, job_name, job_result, failures, device, text):
{"type": "section", "text": {"type": "mrkdwn", "text": failure_text}},
]

def get_new_model_failure_blocks(self, with_header=True):
def get_new_model_failure_blocks(self, with_header=True, to_truncate=True):
if self.prev_ci_artifacts is None:
return {}

Expand Down Expand Up @@ -675,6 +675,8 @@ def get_new_model_failure_blocks(self, with_header=True):
all_failure_lines[new_text].append(f"<{url}|{device}>" if url is not None else device)

MAX_ERROR_TEXT = 3000 - len("[Truncated]") - len("```New model failures```\n\n")
if not to_truncate:
MAX_ERROR_TEXT = float("inf")
failure_text = ""
for line, devices in all_failure_lines.items():
new_text = failure_text + f"{'|'.join(devices)} gpu\n{line}"
Expand Down Expand Up @@ -760,6 +762,13 @@ def post_reply(self):

time.sleep(1)

# To save the list of new model failures
blocks = self.get_new_model_failure_blocks(to_truncate=False)
failure_text = blocks[-1]["text"]["text"]
file_path = os.path.join(os.getcwd(), f"ci_results_{job_name}/new_model_failures.txt")
with open(file_path, "w", encoding="UTF-8") as fp:
fp.write(failure_text)


def retrieve_artifact(artifact_path: str, gpu: Optional[str]):
if gpu not in [None, "single", "multi"]:
Expand Down
Loading