Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed May 31, 2024
1 parent cb4639c commit 9866c90
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions utils/notification_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def get_reply_blocks(self, job_name, job_result, failures, device, text):

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

sorted_dict = sorted(self.model_results.items(), key=lambda t: t[0])

Expand Down Expand Up @@ -768,10 +768,11 @@ def post_reply(self):

# 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)
if blocks:
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]):
Expand Down

0 comments on commit 9866c90

Please sign in to comment.