From 4a065926b7655d9df5c1c018ee8d919361a8579c Mon Sep 17 00:00:00 2001 From: ydshieh Date: Fri, 29 Mar 2024 17:44:33 +0100 Subject: [PATCH] extract warning --- utils/notification_service.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/utils/notification_service.py b/utils/notification_service.py index 8178199a677ea6..6c69631dd980ee 100644 --- a/utils/notification_service.py +++ b/utils/notification_service.py @@ -227,10 +227,13 @@ def warnings(self) -> Dict: button_text = "Check warnings (Link not found)" # Use the workflow run link job_link = f"https://github.com/huggingface/transformers/actions/runs/{os.environ['GITHUB_RUN_ID']}" - if "Extract warnings in CI artifacts" in github_actions_job_links: - button_text = "Check warnings" - # Use the actual job link - job_link = f"{github_actions_job_links['Extract warnings in CI artifacts']}" + + for job in github_actions_jobs: + if "Extract warnings in CI artifacts" in job["name"] and job["conclusion"] == "success": + button_text = "Check warnings" + # Use the actual job link + job_link = job["html_url"] + break huggingface_hub_warnings = [x for x in self.selected_warnings if "huggingface_hub" in x] text = f"There are {len(self.selected_warnings)} warnings being selected."