sessionId = $session; } #[Computed] public function band(): object { return DB::table('session_summaries') ->where('id', $this->sessionId) ->where(function ($q) { $q->where('visibility', 'public'); if (auth()->user() !== null) { $q->orWhere(function ($own) { $own->where('visibility', 'private') ->where('user_id', auth()->id()); }); } }) ->firstOrFail(); } #[Computed] public function runs() { $band = $this->band; return BenchmarkRun::where('suite', 'scenariobench') ->where('model_id', $band->model_id) ->where('model_quant', $band->model_quant) ->where('gpu', $band->gpu) ->where('gpu_count', $band->gpu_count) ->where('user_id', $band->user_id) ->where('visibility', $band->visibility) ->where('engine', $band->engine) ->where(function ($q) use ($band) { $q->whereNull('config_id') ->orWhere('config_id', $this->configIdFromName($band->config_name)); }) ->orderBy('ran_at') ->get(); } private function configIdFromName(?string $name): ?int { if ($name === null) { return null; } return DB::table('server_configs')->where('name', $name)->value('id'); } #[Computed] public function results() { $runIds = $this->runs->pluck('id'); return DB::table('scenario_runs') ->whereIn('benchmark_run_id', $runIds) ->orderBy('scenario') ->orderBy('benchmark_run_id') ->get(); } }; ?>
{{ __('Scenario results') }} @if ($this->band->label) {{ $this->band->label }} @endif {{ $this->band->model_id ?? 'unknown model' }} @if ($this->band->model_quant) {{ $this->band->model_quant }} @endif {{ $this->band->gpu ?? 'unknown GPU' }}
{{ __('Sessions') }}
{{ __('Scenario') }} {{ __('Level') }} {{ __('Pass') }} {{ __('Outcome') }} {{ __('Wall (s)') }} {{ __('Turns') }} {{ __('Commands') }} {{ __('Submissions') }} {{ __('Rejected') }} {{ __('t first sub') }} {{ __('t pass') }} {{ __('Gen tokens') }} @foreach ($this->results as $result) {{ $result->scenario }} {{ $result->level ?? '—' }} @if ($result->ok) @elseif ($result->ok === null) — @else @endif {{ $result->outcome ?? '—' }} {{ number_format($result->wall, 1) }} {{ number_format($result->turns) }} {{ number_format($result->commands) }} {{ number_format($result->submissions) }} {{ number_format($result->rejected) }} {{ number_format($result->t_first_sub, 1) }} {{ $result->t_pass !== null ? number_format($result->t_pass, 1) : '—' }} {{ number_format($result->gen_tokens) }} @endforeach