fix: correct pipeline stage weights to match Core API

Problem:
- rule1_ingestion weight was 0.10 (should be 0.05)
- face_tracing weight was 0.10 (should be 0.05)
- identity_agent was filtered out (should be included with 0.10)
- Progress percentage calculation was incorrect

Solution:
1. Correct weights based on Core team specifications
2. Remove identity_agent filter (now part of pipeline)
3. Use correct weights:
   - processors: 0.30
   - rule1_ingestion: 0.05
   - face_tracing: 0.05
   - identity_agent: 0.10
   - tkg_nodes: 0.20
   - tkg_edges: 0.15
   - rule2_ingestion: 0.15

Impact:
- Progress percentage now accurately reflects pipeline completion
- All stages properly tracked and weighted

Thanks Core team for the correct weight configuration!
This commit is contained in:
2026-07-25 02:20:50 +08:00
parent a096bb645c
commit ec67e749d7

View File

@@ -916,20 +916,19 @@ export async function loadPipelineStats(fileUuid: string, force = false): Promis
try {
const data: any = await apiCall('get_pipeline_stats', { fileUuid })
// 过滤掉identity_agent阶段独立于pipeline
const filteredStages = (data.stages || []).filter((s: any) => s.name !== 'identity_agent')
const stages = data.stages || []
// 覆盖权重为最终设计值Core API返回的权重可能不匹配
const WEIGHT_MAP: Record<string, number> = {
processors: 0.30,
rule1_ingestion: 0.10,
face_tracing: 0.10,
rule1_ingestion: 0.05,
face_tracing: 0.05,
identity_agent: 0.10,
tkg_nodes: 0.20,
tkg_edges: 0.15,
rule2_ingestion: 0.15
}
const mappedStages = filteredStages.map((s: any) => ({
const mappedStages = stages.map((s: any) => ({
name: s.name,
weight: WEIGHT_MAP[s.name] ?? s.weight ?? 0,
progress: s.progress || 0,