import { Download, Square } from 'lucide-react'; import { Badge, Button, ProgressBar, PropertyRow } from '../components/ui'; import type { MobileDeployment } from '../mobile/training'; import { PretrainedIdentity } from './PretrainedSourceSelect'; import { TrainingMetricsPanel } from './TrainingMetricsPanel'; import { trainingLosses } from './trainingLosses'; import { ACTIVE_STATES, stateLabel } from './trainingPresentation'; import type { TrainingJob } from './types'; export function TrainingJobSection({ job, mobileDeployment, busy, onContinue, onCancel, onImport, onNew, }: { job: TrainingJob; mobileDeployment?: MobileDeployment; busy: boolean; onContinue(): void; onCancel(): void | Promise; onImport(): void | Promise; onNew(): void; }) { const active = ACTIVE_STATES.has(job.state); return (
{job.taskId} {stateLabel(job.state)}
{mobileDeployment?.evaluation && (

导出成功不代表策略达标;未达标策略导入仅用于调试,请先同阶段续训。

)} {job.taskId === 'Unitree-Go2-Rough' && (

仅后端评测:234 维 Rough 策略无法在浏览器加载。

)} {job.deployment?.terrain && (

导入会替换当前物理地图并启动配套策略,请先保存场景。

{job.deployment.terrain.approximation ? '近似碰撞布局' : '配套碰撞布局'}
)}

{job.message}

{trainingLosses(job.logs).map(({ label, value }) => ( ))}
{job.logs.length > 0 && (
最近日志
            {job.logs.slice(-40).join('\n')}
          
)} {mobileDeployment && job.state === 'succeeded' && ( )}
{active ? ( ) : ( <> )}
); }