Skip to content

Commit

Permalink
Added changes for working benchmark file
Browse files Browse the repository at this point in the history
  • Loading branch information
Anshuman Raina committed Nov 12, 2024
1 parent 01b8ee8 commit 120803e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,6 @@ jobs:
# scp raina.ans@login-00.discovery.neu.edu:/work/VitekLab/Projects/Benchmarking/job_error.txt job_error.txt
scp raina.ans@login-00.discovery.neu.edu:/home/raina.ans/R/job_output.txt job_output.txt
scp raina.ans@login-00.discovery.neu.edu:/home/raina.ans/R/job_error.txt job_error.txt

- name: Check Metrics in Output
run: |
THRESHOLD_FPR=0.2
METRICS=$(tail -n 20 job_output.txt | grep -E 'FPR|Accuracy|Recall|FDR' | tail -n 3)
echo METRICS

FPR=$(echo "$METRICS" | grep -oP 'FPR\s+\K[0-9.]+')
ACCURACY=$(echo "$METRICS" | grep -oP 'Accuracy\s+\K[0-9.]+')
RECALL=$(echo "$METRICS" | grep -oP 'Recall\s+\K[0-9.]+')

echo "Extracted Metrics - FPR: $FPR, Accuracy: $ACCURACY, Recall: $RECALL"

if (( $(echo "$FPR > $THRESHOLD_FPR" | bc -l) )) ||
(( $(echo "$ACCURACY < $THRESHOLD_ACCURACY" | bc -l) )) ||
(( $(echo "$RECALL < $THRESHOLD_RECALL" | bc -l) )); then
echo "Metrics did not meet the thresholds."
exit 1
else
echo "Metrics are within acceptable range."
fi
- name: Upload Output as Artifact
Expand Down

0 comments on commit 120803e

Please sign in to comment.