interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / docs / native / pi5-8 / orchestrator-exam / summarize.sh

34 lines · 1718 bytes Raw Blame History
1#!/bin/bash
2# SPDX-License-Identifier: Apache-2.0
3# Copyright 2026 Drake Stapleton (AIEN / aien-dev)
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# Score every results/*.jsonl into results/summary.tsv (per split, plus split "all" = train+dev+heldout pooled),
18# and write results/tokens.tsv (prompt/output token stats per model).
19here=$(cd "$(dirname "$0")" && pwd)
20{
21 "$here/score.sh" --header
22 for f in "$here"/results/*.*.*.jsonl; do
23 b=$(basename "$f" .jsonl); mode=${b##*.}; r=${b%.*}; split=${r##*.}; name=${r%.*}
24 "$here/score.sh" "$name" "$split" "$mode"
25 [ "$split" = train ] && "$here/score.sh" "$name" all "$mode"
26 done | sort -t$'\t' -k1,1 -k2,2 -k3,3
27} > "$here/results/summary.tsv"
28# token cost per model (free mode, dev): prefix = prompt tokens of the shortest message (D079), the prompt a Pi would cache once
29{ printf 'model\tprefix_ptok\tmean_ptok\tmean_ctok\tmean_ms_host_cpu\n'
30 for f in "$here"/results/*.dev.free.jsonl; do
31 n=$(basename "$f" .dev.free.jsonl)
32 jq -rs --arg n "$n" '(map(select(.id=="D079").ptok)[0]) as $p | [$n,$p,(map(.ptok)|add/length|round),((map(.ctok)|add/length*10|round)/10),(map(.ms)|add/length|round)]|@tsv' "$f"
33 done
34} > "$here/results/tokens.tsv"