Skip to content

Commit 8d3329c

Browse files
committed
Improve JQ execution by moving query to its own file
We had quoting issues running this locally.
1 parent 995eab2 commit 8d3329c

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

artifacts/summary.jq

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.HostEnvironmentInfo.ChronometerFrequency.Hertz as $ticks
2+
| .Benchmarks
3+
| map(select((.Parameters
4+
| (contains("-mini") or contains("-beta")) | not)))
5+
| map({
6+
provider: .Parameters[7:10],
7+
model: .Parameters[11:],
8+
mean: ((.Statistics.Mean / $ticks) | . * 10 | floor | . / 1000)
9+
})
10+
| reduce .[] as $item ({};
11+
. + {($item.provider): {
12+
mean: $item.mean,
13+
model: $item.model
14+
}}
15+
)

update.ps1

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,13 @@ dotnet run -c Release --no-launch-profile
55
if (-not $?) { throw 'Failed to run benchmarks' }
66

77
popd;
8+
pushd .\artifacts
89

9-
jq -r '.HostEnvironmentInfo.ChronometerFrequency.Hertz as $ticks
10-
| .Benchmarks
11-
| map(select((.Parameters
12-
| (contains("-mini") or contains("-beta")) | not)))
13-
| map({
14-
provider: .Parameters[7:10],
15-
model: .Parameters[11:],
16-
mean: ((.Statistics.Mean / $ticks) | . * 10 | floor | . / 1000)
17-
})
18-
| reduce .[] as $item ({};
19-
. + {($item.provider): {
20-
mean: $item.mean,
21-
model: $item.model
22-
}}
23-
)' .\artifacts\results\AI.Benchmarks.ModelPerformance-report-full.json > .\artifacts\summary.json
10+
jq -r -f summary.jq .\results\AI.Benchmarks.ModelPerformance-report-full.json > summary.json
2411

2512
if (-not $?) { throw 'Failed to create summary' }
2613

14+
popd;
2715
.\resolve-file-includes.ps1
2816
git add *.json
2917
git add *.md

0 commit comments

Comments
 (0)