Skip to content

Commit 90997a5

Browse files
committed
[CI] Fix README.md parsing in accuracy update script
1 parent af3d27e commit 90997a5

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,10 @@ jobs:
504504
accuracy_${{ matrix.model }}.txt
505505
accuracy_value_${{ matrix.model }}.txt
506506
507-
- name: Update README for model (main only)
508-
if: github.ref == 'refs/heads/main'
507+
- name: Update README for model
509508
run: |
510-
TOP1_ACC=$(grep -oE 'Top-1 Accuracy: [0-9]+\.?[0-9]*%' accuracy_${{ matrix.model }}.txt | grep -oE '[0-9]+\.?[0-9]*')
511-
TOP5_ACC=$(grep -oE 'Top-5 Accuracy: [0-9]+\.?[0-9]*%' accuracy_${{ matrix.model }}.txt | grep -oE '[0-9]+\.?[0-9]*')
509+
TOP1_ACC=$(grep -oE 'Top-1 Accuracy: [0-9]+\.?[0-9]*%' accuracy_${{ matrix.model }}.txt | grep -oE '[0-9]+\.?[0-9]*' | head -n1)
510+
TOP5_ACC=$(grep -oE 'Top-5 Accuracy: [0-9]+\.?[0-9]*%' accuracy_${{ matrix.model }}.txt | grep -oE '[0-9]+\.?[0-9]*' | head -n1)
512511
DATE=$(date '+%Y-%m-%d')
513512
514513
if [ -z "$TOP1_ACC" ] || [ -z "$TOP5_ACC" ]; then

0 commit comments

Comments
 (0)