Skip to content

Commit

Permalink
run daily ci 2024/11/21
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Nov 21, 2024
1 parent dabdbda commit c25d251
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_failed_model_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Get target commit
working-directory: /transformers/utils
run: |
echo "END_SHA=$(TOKEN=${{ secrets.ACCESS_REPO_INFO_TOKEN }} python3 -c 'import os; from get_previous_daily_ci import get_last_daily_ci_run_commit; commit=get_last_daily_ci_run_commit(token=os.environ["TOKEN"]); print(commit)')" >> $GITHUB_ENV
echo "END_SHA=$(TOKEN=${{ secrets.ACCESS_REPO_INFO_TOKEN }} python3 -c 'commit = "30335093276212ce74938bdfd85bfd5df31a668a"; print(commit)')" >> $GITHUB_ENV

Check warning on line 50 in .github/workflows/check_failed_model_tests.yml

View workflow job for this annotation

GitHub Actions / trufflehog

Found unverified Github result 🐷🔑
- name: Checkout to `start_sha`
working-directory: /transformers
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/self-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -562,3 +562,13 @@ jobs:
ci_event: ${{ inputs.ci_event }}

secrets: inherit

check_new_model_failures:
if: ${{ always() && inputs.ci_event == 'Daily CI' && inputs.job == 'run_models_gpu' && needs.send_results.result == 'success' }}
name: Check new model failures
needs: send_results
uses: ./.github/workflows/check_failed_model_tests.yml
with:
docker: ${{ inputs.docker }}
start_sha: ${{ github.sha }}
secrets: inherit
10 changes: 5 additions & 5 deletions utils/notification_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,12 @@ def payload(self) -> str:
file_path = os.path.join(os.getcwd(), f"ci_results_{job_name}/new_model_failures.txt")
commit_info = api.upload_file(
path_or_fileobj=file_path,
path_in_repo=f"{(datetime.datetime.today() - datetime.timedelta(days = 1)).strftime('%Y-%m-%d')}/ci_results_{job_name}/new_model_failures.txt",
path_in_repo=f"{(datetime.datetime.today()).strftime('%Y-%m-%d')}/ci_results_{job_name}/new_model_failures.txt",
repo_id="hf-internal-testing/transformers_daily_ci",
repo_type="dataset",
token=os.environ.get("TRANSFORMERS_CI_RESULTS_UPLOAD_TOKEN", None),
)
url = f"https://huggingface.co/datasets/hf-internal-testing/transformers_daily_ci/raw/{commit_info.oid}/{(datetime.datetime.today() - datetime.timedelta(days = 1)).strftime('%Y-%m-%d')}/ci_results_{job_name}/new_model_failures.txt"
url = f"https://huggingface.co/datasets/hf-internal-testing/transformers_daily_ci/raw/{commit_info.oid}/{(datetime.datetime.today()).strftime('%Y-%m-%d')}/ci_results_{job_name}/new_model_failures.txt"

# extra processing to save to json format
new_failed_tests = {}
Expand All @@ -559,7 +559,7 @@ def payload(self) -> str:
file_path = os.path.join(os.getcwd(), f"ci_results_{job_name}/new_model_failures.json")
_ = api.upload_file(
path_or_fileobj=file_path,
path_in_repo=f"{(datetime.datetime.today() - datetime.timedelta(days = 1)).strftime('%Y-%m-%d')}/ci_results_{job_name}/new_model_failures.json",
path_in_repo=f"{(datetime.datetime.today()).strftime('%Y-%m-%d')}/ci_results_{job_name}/new_model_failures.json",
repo_id="hf-internal-testing/transformers_daily_ci",
repo_type="dataset",
token=os.environ.get("TRANSFORMERS_CI_RESULTS_UPLOAD_TOKEN", None),
Expand Down Expand Up @@ -1232,7 +1232,7 @@ def prepare_reports(title, header, reports, to_truncate=True):
if is_scheduled_ci_run:
api.upload_file(
path_or_fileobj=f"ci_results_{job_name}/model_results.json",
path_in_repo=f"{(datetime.datetime.today() - datetime.timedelta(days = 1)).strftime('%Y-%m-%d')}/ci_results_{job_name}/model_results.json",
path_in_repo=f"{(datetime.datetime.today()).strftime('%Y-%m-%d')}/ci_results_{job_name}/model_results.json",
repo_id="hf-internal-testing/transformers_daily_ci",
repo_type="dataset",
token=os.environ.get("TRANSFORMERS_CI_RESULTS_UPLOAD_TOKEN", None),
Expand All @@ -1254,7 +1254,7 @@ def prepare_reports(title, header, reports, to_truncate=True):
if is_scheduled_ci_run:
api.upload_file(
path_or_fileobj=f"ci_results_{job_name}/{test_to_result_name[job]}_results.json",
path_in_repo=f"{(datetime.datetime.today() - datetime.timedelta(days = 1)).strftime('%Y-%m-%d')}/ci_results_{job_name}/{test_to_result_name[job]}_results.json",
path_in_repo=f"{(datetime.datetime.today()).strftime('%Y-%m-%d')}/ci_results_{job_name}/{test_to_result_name[job]}_results.json",
repo_id="hf-internal-testing/transformers_daily_ci",
repo_type="dataset",
token=os.environ.get("TRANSFORMERS_CI_RESULTS_UPLOAD_TOKEN", None),
Expand Down

0 comments on commit c25d251

Please sign in to comment.