Skip to content

Commit b46e56c

Browse files
Update benchmarks.yml
1 parent 0119316 commit b46e56c

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -71,42 +71,7 @@ jobs:
7171
timeout-minutes: 30
7272
shell: bash
7373
run: |
74-
output=$(bash run.sh)
75-
echo "$output"
76-
77-
# Extract metrics using Python and regex
78-
python - << EOF
79-
import re
80-
import json
81-
82-
text = \"\"\"${output}\"\"\"
83-
84-
ttft_pattern = r"TTFT: ([\d.]+) ms ± ([\d.]+)%"
85-
e2e_latency_pattern = r"E2E Latency: ([\d.]+) ms ± ([\d.]+)%"
86-
tpot_pattern = r"TPOT: ([\d.]+) ms"
87-
88-
ttft_match = re.search(ttft_pattern, text)
89-
e2e_latency_match = re.search(e2e_latency_pattern, text)
90-
tpot_match = re.search(tpot_pattern, text)
91-
92-
metrics = {
93-
"TTFT": {"value": ttft_match.group(1) if ttft_match else None, "std_dev": ttft_match.group(2) if ttft_match else None},
94-
"E2E Latency": {"value": e2e_latency_match.group(1) if e2e_latency_match else None, "std_dev": e2e_latency_match.group(2) if e2e_latency_match else None},
95-
"TPOT": {"value": tpot_match.group(1) if tpot_match else None},
96-
}
97-
98-
with open("metrics.json", "w") as f:
99-
json.dump(metrics, f, indent=4)
100-
101-
print(f"::set-output name=metrics::{json.dumps(metrics)}")
102-
EOF
103-
104-
# Upload metrics as an artifact (optional)
105-
# Create the results directory if it doesn't exist
106-
mkdir -p ../../../../../results
107-
108-
# Copy the metrics.json file to the results directory
109-
cp metrics.json ../../../../../results/
74+
bash run.sh > results/flax_2b.log 2>&1
11075
11176
- name: Wait For Connection
11277
uses: google-ml-infra/actions/ci_connection@main

0 commit comments

Comments
 (0)