Commit ·
37b647c
1
Parent(s): e57d344
Address CodeRabbit review feedback
Browse files- Set persist-credentials: false on checkout step
- Pin pandas to 2.2.3 instead of unpinned latest
- Use GITHUB_TOKEN for push credentials in commit step
- Fix validation: flag metrics missing from all results, not just NaN
.github/workflows/update-csv.yml
CHANGED
|
@@ -14,20 +14,25 @@ jobs:
|
|
| 14 |
contents: write
|
| 15 |
steps:
|
| 16 |
- uses: actions/checkout@v4
|
|
|
|
|
|
|
| 17 |
|
| 18 |
- uses: actions/setup-python@v5
|
| 19 |
with:
|
| 20 |
python-version: "3.12"
|
| 21 |
|
| 22 |
- name: Install dependencies
|
| 23 |
-
run: pip install pandas
|
| 24 |
|
| 25 |
- name: Generate CSV
|
| 26 |
run: python src/results_to_csv.py
|
| 27 |
|
| 28 |
- name: Commit if changed
|
|
|
|
|
|
|
| 29 |
run: |
|
| 30 |
git config user.name "github-actions[bot]"
|
| 31 |
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
| 32 |
git add results.csv
|
| 33 |
-
git diff --staged --quiet || git commit -m "Auto-update results.csv" && git push
|
|
|
|
| 14 |
contents: write
|
| 15 |
steps:
|
| 16 |
- uses: actions/checkout@v4
|
| 17 |
+
with:
|
| 18 |
+
persist-credentials: false
|
| 19 |
|
| 20 |
- uses: actions/setup-python@v5
|
| 21 |
with:
|
| 22 |
python-version: "3.12"
|
| 23 |
|
| 24 |
- name: Install dependencies
|
| 25 |
+
run: pip install pandas==2.2.3
|
| 26 |
|
| 27 |
- name: Generate CSV
|
| 28 |
run: python src/results_to_csv.py
|
| 29 |
|
| 30 |
- name: Commit if changed
|
| 31 |
+
env:
|
| 32 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 33 |
run: |
|
| 34 |
git config user.name "github-actions[bot]"
|
| 35 |
git config user.email "github-actions[bot]@users.noreply.github.com"
|
| 36 |
+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
|
| 37 |
git add results.csv
|
| 38 |
+
git diff --staged --quiet || (git commit -m "Auto-update results.csv" && git push)
|
src/results_to_csv.py
CHANGED
|
@@ -57,7 +57,7 @@ def validate(df: pd.DataFrame) -> bool:
|
|
| 57 |
issues = []
|
| 58 |
for _, row in df.iterrows():
|
| 59 |
label = f"{row.get('benchmark.name', '?')} / {row.get('model.name', '?')} / {row.get('harness.name', '?')}"
|
| 60 |
-
missing = [col for col in REQUIRED_METRICS if col in df.columns
|
| 61 |
if missing:
|
| 62 |
fields = ", ".join(c.replace("metrics.", "") for c in missing)
|
| 63 |
issues.append(f" {label}: missing {fields}")
|
|
|
|
| 57 |
issues = []
|
| 58 |
for _, row in df.iterrows():
|
| 59 |
label = f"{row.get('benchmark.name', '?')} / {row.get('model.name', '?')} / {row.get('harness.name', '?')}"
|
| 60 |
+
missing = [col for col in REQUIRED_METRICS if col not in df.columns or pd.isna(row.get(col))]
|
| 61 |
if missing:
|
| 62 |
fields = ", ".join(c.replace("metrics.", "") for c in missing)
|
| 63 |
issues.append(f" {label}: missing {fields}")
|