mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
* feat(benchmark): Require full benchmark with AI for community sharing Only allow users to share benchmark results with the community leaderboard when they have completed a full benchmark that includes AI performance data. Frontend changes: - Add AI Assistant installation check via service API query - Show pre-flight warning when clicking Full Benchmark without AI installed - Disable AI Only button when AI Assistant not installed - Show "Partial Benchmark" info alert for non-shareable results - Only display "Share with Community" for full benchmarks with AI data - Add note about AI installation requirement with link to Apps page Backend changes: - Validate benchmark_type is 'full' before allowing submission - Require ai_tokens_per_second > 0 for community submission - Return clear error messages explaining requirements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(benchmark): UI improvements and GPU detection fix - Fix GPU detection to properly identify AMD discrete GPUs - Fix gauge colors (high scores now green, low scores red) - Fix gauge centering (SVG size matches container) - Add info tooltips for Tokens/sec and Time to First Token Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(benchmark): Extract iGPU from AMD APU CPU name as fallback When systeminformation doesn't detect graphics controllers (common on headless Linux), extract the integrated GPU name from AMD APU CPU model strings like "AMD Ryzen AI 9 HX 370 w/ Radeon 890M". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(benchmark): Add Builder Tag system for community leaderboard - Add builder_tag column to benchmark_results table - Create BuilderTagSelector component with word dropdowns + randomize - Add 50 adjectives and 50 nouns for NOMAD-themed tags (e.g., Tactical-Llama-1234) - Add anonymous sharing option checkbox - Add builder tag display in Benchmark Details section - Add Benchmark History section showing all past benchmarks - Update submission API to accept anonymous flag - Add /api/benchmark/builder-tag endpoint to update tags Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(benchmark): Add HMAC signing for leaderboard submissions Sign benchmark submissions with HMAC-SHA256 to prevent casual API abuse. Includes X-NOMAD-Timestamp and X-NOMAD-Signature headers. Note: Since NOMAD is open source, a determined attacker could extract the secret. This provides protection against casual abuse only. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
86 lines
1.7 KiB
TypeScript
86 lines
1.7 KiB
TypeScript
import { DateTime } from 'luxon'
|
|
import { BaseModel, column, SnakeCaseNamingStrategy } from '@adonisjs/lucid/orm'
|
|
import type { BenchmarkType, DiskType } from '../../types/benchmark.js'
|
|
|
|
export default class BenchmarkResult extends BaseModel {
|
|
static namingStrategy = new SnakeCaseNamingStrategy()
|
|
|
|
@column({ isPrimary: true })
|
|
declare id: number
|
|
|
|
@column()
|
|
declare benchmark_id: string
|
|
|
|
@column()
|
|
declare benchmark_type: BenchmarkType
|
|
|
|
// Hardware information
|
|
@column()
|
|
declare cpu_model: string
|
|
|
|
@column()
|
|
declare cpu_cores: number
|
|
|
|
@column()
|
|
declare cpu_threads: number
|
|
|
|
@column()
|
|
declare ram_bytes: number
|
|
|
|
@column()
|
|
declare disk_type: DiskType
|
|
|
|
@column()
|
|
declare gpu_model: string | null
|
|
|
|
// System benchmark scores
|
|
@column()
|
|
declare cpu_score: number
|
|
|
|
@column()
|
|
declare memory_score: number
|
|
|
|
@column()
|
|
declare disk_read_score: number
|
|
|
|
@column()
|
|
declare disk_write_score: number
|
|
|
|
// AI benchmark scores (nullable for system-only benchmarks)
|
|
@column()
|
|
declare ai_tokens_per_second: number | null
|
|
|
|
@column()
|
|
declare ai_model_used: string | null
|
|
|
|
@column()
|
|
declare ai_time_to_first_token: number | null
|
|
|
|
// Composite NOMAD score (0-100)
|
|
@column()
|
|
declare nomad_score: number
|
|
|
|
// Repository submission tracking
|
|
@column({
|
|
serialize(value) {
|
|
return Boolean(value)
|
|
},
|
|
})
|
|
declare submitted_to_repository: boolean
|
|
|
|
@column.dateTime()
|
|
declare submitted_at: DateTime | null
|
|
|
|
@column()
|
|
declare repository_id: string | null
|
|
|
|
@column()
|
|
declare builder_tag: string | null
|
|
|
|
@column.dateTime({ autoCreate: true })
|
|
declare created_at: DateTime
|
|
|
|
@column.dateTime({ autoCreate: true, autoUpdate: true })
|
|
declare updated_at: DateTime
|
|
}
|