Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into leaderboard-gemma
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudotexe committed Apr 16, 2024
2 parents 4a82050 + a8ca172 commit 7dad82b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/leaderboard-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ jobs:
FANOUTQA_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: python leaderboard-submissions/hydrate.py

# ensure the PR comment exists so we can edit it in future steps
- name: Ensure PR comment
if: steps.eval.outputs.changed > 0 || failure()
run: |
if [[ -z $(gh pr view ${{ github.event.number }} --json comments | jq '.comments[].author.login | select(. == "github-actions")') ]]; then
gh pr comment ${{ github.event.number }} -b "Results incoming...";
fi
- name: Add PR comment (failure)
if: failure()
run: gh pr comment ${{ github.event.number }} --edit-last -b "It looks like this eval run failed. Please check the [workflow logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) to see what went wrong, then push a new commit to your PR to rerun the eval."
Expand Down
2 changes: 2 additions & 0 deletions leaderboard-submissions/hydrate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hashlib
import json
import os
import traceback
from collections import namedtuple
from dataclasses import asdict, dataclass
from pathlib import Path
Expand Down Expand Up @@ -81,6 +82,7 @@ def hydrate_all():
except Exception as e:
# if invalid, log a check annotation and mark job failure
print(f"::error file={metadata_fp},title=Could not eval submission::{e}")
traceback.print_exc()
exit_code = 1

print(f"Done. Wrote {len(written_files)} results files.")
Expand Down

0 comments on commit 7dad82b

Please sign in to comment.