From 7b4f5b341f9a50934c6c7f2ea6a7c12baf79eb56 Mon Sep 17 00:00:00 2001 From: ydshieh Date: Wed, 22 May 2024 14:48:35 +0200 Subject: [PATCH] fix --- utils/notification_service.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/utils/notification_service.py b/utils/notification_service.py index cf126cd68a3385..83b3244f920951 100644 --- a/utils/notification_service.py +++ b/utils/notification_service.py @@ -1164,15 +1164,16 @@ def prepare_reports(title, header, reports, to_truncate=True): json.dump(job_result, fp, indent=4, ensure_ascii=False) prev_ci_artifacts = None - target_workflow = "huggingface/transformers/.github/workflows/self-scheduled.yml@refs/heads/main" - if os.environ.get("CI_WORKFLOW_REF") == target_workflow: - # Get the last previously completed CI's failure tables - artifact_names = [f"ci_results_{job_name}"] - output_dir = os.path.join(os.getcwd(), "previous_reports") - os.makedirs(output_dir, exist_ok=True) - prev_ci_artifacts = get_last_daily_ci_reports( - artifact_names=artifact_names, output_dir=output_dir, token=os.environ["ACCESS_REPO_INFO_TOKEN"] - ) + if job_name == "run_models_gpu": + target_workflow = "huggingface/transformers/.github/workflows/self-scheduled-caller.yml@refs/heads/main" + if os.environ.get("CI_WORKFLOW_REF") == target_workflow: + # Get the last previously completed CI's failure tables + artifact_names = [f"ci_results_{job_name}"] + output_dir = os.path.join(os.getcwd(), "previous_reports") + os.makedirs(output_dir, exist_ok=True) + prev_ci_artifacts = get_last_daily_ci_reports( + artifact_names=artifact_names, output_dir=output_dir, token=os.environ["ACCESS_REPO_INFO_TOKEN"] + ) message = Message( title,