mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-05 15:43:44 +08:00
and this is my lab
This commit is contained in:
@@ -21,7 +21,7 @@ import { Sidebar } from "/assets/components/sidebar.js?v=controllers-nav-1"
|
||||
import { SentryMode } from "/assets/components/tools/sentry.js"
|
||||
import { SpeedLimits } from "/assets/components/tools/speed_limits.js"
|
||||
import { ModelManager } from "/assets/components/tools/model_manager.js?v=20260825a"
|
||||
import { ModelLaboratory } from "/assets/components/tools/model_laboratory.js?v=model-lab-1"
|
||||
import { ModelLaboratory } from "/assets/components/tools/model_laboratory.js?v=model-lab-4"
|
||||
import { LivePlots } from "/assets/components/tools/plots.js"
|
||||
import { ThemeMaker } from "/assets/components/tools/theme_maker.js"
|
||||
import { TestingGround } from "/assets/components/tools/testing_ground.js"
|
||||
|
||||
@@ -229,30 +229,13 @@
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.ml-findings {
|
||||
display: grid;
|
||||
gap: var(--gap-md);
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.ml-findings ul {
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 0;
|
||||
padding-left: 1.2rem;
|
||||
}
|
||||
|
||||
.ml-findings li + li {
|
||||
margin-top: 0.45rem;
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.ml-wrapper {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.ml-pair,
|
||||
.ml-runtime-grid,
|
||||
.ml-findings {
|
||||
.ml-runtime-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ function renderModel(model) {
|
||||
<div class="ml-chips">
|
||||
<span class="ml-chip">${model.version || "unknown version"}</span>
|
||||
<span class="ml-chip">${model.modelSize || "small"}</span>
|
||||
<span class="ml-chip ${model.modelLabArtifactInstalled ? "ml-chip-good" : "ml-chip-warning"}">
|
||||
<span class="${`ml-chip ${model.modelLabArtifactInstalled ? "ml-chip-good" : "ml-chip-warning"}`}">
|
||||
${artifactStatus}
|
||||
</span>
|
||||
${model.modelLabArtifactAvailable && !model.modelLabArtifactInstalled ? html`
|
||||
@@ -255,15 +255,14 @@ export function ModelLaboratory() {
|
||||
<div class="ml-wrapper">
|
||||
<header class="ml-hero">
|
||||
<div>
|
||||
<div class="ml-kicker">Chestnut experiment</div>
|
||||
<h2>Model Laboratory</h2>
|
||||
<p>Use the lateral judgment of one small model and the longitudinal judgment of another.</p>
|
||||
</div>
|
||||
<div class="ml-chips">
|
||||
<span class="ml-chip ${() => state.chestnutReady ? "ml-chip-good" : "ml-chip-warning"}">
|
||||
<span class="${() => `ml-chip ${state.chestnutReady ? "ml-chip-good" : "ml-chip-warning"}`}">
|
||||
${() => state.chestnutReady ? "Chestnut ready" : "Chestnut required"}
|
||||
</span>
|
||||
<span class="ml-chip ${() => state.isOnroad ? "ml-chip-warning" : "ml-chip-good"}">
|
||||
<span class="${() => `ml-chip ${state.isOnroad ? "ml-chip-warning" : "ml-chip-good"}`}">
|
||||
${() => state.isOnroad ? "Onroad · locked" : "Parked · configurable"}
|
||||
</span>
|
||||
</div>
|
||||
@@ -280,7 +279,7 @@ export function ModelLaboratory() {
|
||||
<h3>Compose a pair</h3>
|
||||
<p>Both precompiled small models stay resident and run every camera frame on Chestnut's AMD GPU.</p>
|
||||
</div>
|
||||
<span class="ml-state ${() => state.configuration.enabled ? "is-enabled" : ""}">
|
||||
<span class="${() => `ml-state ${state.configuration.enabled ? "is-enabled" : ""}`}">
|
||||
${() => state.configuration.enabled ? "Enabled" : "Disabled"}
|
||||
</span>
|
||||
</div>
|
||||
@@ -339,7 +338,7 @@ export function ModelLaboratory() {
|
||||
<h3>Runtime</h3>
|
||||
<p>The configuration activates when modeld starts for a drive.</p>
|
||||
</div>
|
||||
<span class="ml-state ${() => state.runtime?.active ? "is-enabled" : ""}">
|
||||
<span class="${() => `ml-state ${state.runtime?.active ? "is-enabled" : ""}`}">
|
||||
${() => state.runtime?.active ? "Pair active" : state.runtime?.requested ? "Pair requested" : "Inactive"}
|
||||
</span>
|
||||
</div>
|
||||
@@ -354,28 +353,17 @@ export function ModelLaboratory() {
|
||||
<section class="ml-card">
|
||||
<div class="ml-card-heading">
|
||||
<div>
|
||||
<h3>Small-model readiness</h3>
|
||||
<p>${state.summary.ready || 0} AMD-ready · ${state.summary.published || 0} published · ${state.summary.eligible || 0} eligible small models.</p>
|
||||
<h3>Available models</h3>
|
||||
<p>${() => `${state.summary.ready || 0} ready to pair · ${Math.max((state.summary.published || 0) - (state.summary.ready || 0), 0)} available to download.`}</p>
|
||||
</div>
|
||||
<span class="ml-chip">Manifest ${state.manifest.version || "unknown"}</span>
|
||||
</div>
|
||||
<div class="ml-model-list">${() => state.models.map(renderModel)}</div>
|
||||
<div class="ml-model-list">${() => readyModels().map(renderModel)}</div>
|
||||
<div class="ml-note">
|
||||
Model Manager downloads the manifest's precompiled AMD variants. Nothing is compiled on the comma.
|
||||
A normal installed model may still need its separate Chestnut artifact.
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="ml-findings">
|
||||
<article class="ml-card">
|
||||
<h3>Manifest shortcomings</h3>
|
||||
<ul>${(state.manifest.shortcomings || []).map(item => html`<li>${item}</li>`)}</ul>
|
||||
</article>
|
||||
<article class="ml-card">
|
||||
<h3>Opportunities</h3>
|
||||
<ul>${(state.manifest.opportunities || []).map(item => html`<li>${item}</li>`)}</ul>
|
||||
</article>
|
||||
</section>
|
||||
` : ""}
|
||||
</div>
|
||||
`
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<link rel="stylesheet" href="/assets/components/tools/error_logs.css">
|
||||
<link rel="stylesheet" href="/assets/components/tools/maps.css">
|
||||
<link rel="stylesheet" href="/assets/components/tools/model_manager.css">
|
||||
<link rel="stylesheet" href="/assets/components/tools/model_laboratory.css?v=model-lab-1">
|
||||
<link rel="stylesheet" href="/assets/components/tools/model_laboratory.css?v=model-lab-4">
|
||||
<link rel="stylesheet" href="/assets/components/tools/plots.css">
|
||||
<link rel="stylesheet" href="/assets/components/tools/speed_limits.css">
|
||||
<link rel="stylesheet" href="/assets/components/tools/theme_maker.css">
|
||||
|
||||
@@ -121,5 +121,14 @@ def test_model_laboratory_frontend_exposes_guards_and_role_copy():
|
||||
assert "run every camera frame on Chestnut's AMD GPU" in source
|
||||
assert 'lateral.value === longitudinal.value' in source
|
||||
assert 'lateral.version !== longitudinal.version' not in source
|
||||
assert 'class="ml-chip ${' not in source
|
||||
assert 'class="ml-state ${() =>' not in source
|
||||
assert 'class="${() => `ml-chip ${' in source
|
||||
assert 'class="${() => `ml-state ${' in source
|
||||
assert "Path shape, curvature, lane geometry" in source
|
||||
assert "Speed, acceleration, stopping, leads" in source
|
||||
assert "Chestnut experiment" not in source
|
||||
assert "Manifest shortcomings" not in source
|
||||
assert "Opportunities" not in source
|
||||
assert 'model_laboratory.js?v=model-lab-4' in ROUTER_PATH.read_text(encoding="utf-8")
|
||||
assert 'model_laboratory.css?v=model-lab-4' in INDEX_PATH.read_text(encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user