feat(all): 数据库模块化拆分与版本化迁移、任务引擎命名体系收敛、物理输出校验加固与用户配置接通
- server/db: 拆 4929 行 db.rs 单体为 db/ 目录,migrations.rs 引入 PRAGMA user_version
版本化迁移运行器(M1~M13)
- 任务引擎 Phase 6/7b/7c 改名收敛:EngineStageConfig→PhaseConfig、StagePolicy→ResumePolicy、
Converged→Completed、删除 task_type 列、success_method 拆 tlusty_/synspec_ 双列、
新增 tlusty_status/synspec_status 半失败阶段守卫
- 科学正确性加固:conv_check 任意行 NaN/Inf/溢出判无效(0 行容忍)、新增 spec_is_valid
校验 SYNSPEC 脏谱、itek_history 逐次迭代全量保真、fmt_abn powf 溢出饱和
- 用户配置真正接通:tlusty_chain/tlusty_input 由死字段经 调度器→TaskSpec→executor→runner
透传生效;config 加载期 validate + deny_unknown_fields + 解析失败记 warn
- 调度修复:H1 活锁(pending_strategies 跳过已失败策略)、种子查找错误不再静默降级冷启动
- dashboard: 阶段配置面板 tlusty_stage/synspec_stage、"已完成"标签、迭代诊断展示
- docs: 新增 database_refactor_design.md,同步 database/api/PIPELINE/workflow_detail
This commit is contained in:
+13
-9
@@ -159,10 +159,10 @@ ND=50,NLAMBD=3,VTB=2.,ISPODF=1,DDNU=50.,CNU1=6.,[CHMAX=..][,ITEK=..],NITER=<阶
|
||||
### 3.3 synspec 配置(fort.55 + 谱线表)
|
||||
|
||||
```
|
||||
fort.55 控制卡: 波长窗/展宽/截断(由 workflow YAML 的 synspec: 块或代码默认配置)
|
||||
fort.55 控制卡: 波长窗/展宽/截断(由 workflow YAML 的 `synspec_input:` 块或代码默认配置)
|
||||
谱线表 fort.19: data 下 gf 谱线数据(含 C/N/O 线)
|
||||
```
|
||||
- 代码默认波长窗为 **1400–1410 Å**(`SynspecConfig` 默认),实际使用通常配置到
|
||||
- 代码默认波长窗为 **1400–1410 Å**(`SynspecInput` 默认),实际使用通常配置到
|
||||
目标波段(如 3000-7000Å 光学波段,覆盖 C II 4267、C III 4647 等)。
|
||||
- 大气来自 nl 阶段的 `.7`(复制为 fort.8)。
|
||||
|
||||
@@ -245,7 +245,8 @@ fort.55 控制卡: 波长窗/展宽/截断(由 workflow YAML 的 synspec: 块
|
||||
> **走种子步进链时**:`seed` 指向邻居 `.7`,`stages` 里没有 `lte`,而是
|
||||
> `seed_nc`(`ltgray=F` 热启动,NITER=20)→ `nl`。
|
||||
> 注意:`conv.json` 不含 `seed_step_used` / `coldfail_backup` 布尔字段(旧版字段已移除);
|
||||
> 收敛手段归因由服务端 `tasks` 表的 `task_type`(cold_run / seed_step)聚合统计。
|
||||
> 收敛手段归因由服务端 `tasks` 表的 `tlusty_strategies[0]`(cold_run / seed_step)聚合统计
|
||||
> (Phase 6 起 `task_type` 列已删除,策略链首项即当前执行策略的权威快照)。
|
||||
|
||||
每阶段记录:`converged`(是否收敛)、`max_relc`(最大相对变化)、
|
||||
`worst_depth`(最差深度点)、`last_iter`(迭代次数)、`n_depths`(深度点数)、
|
||||
@@ -262,11 +263,11 @@ runner 在每个阶段的循环开始/结束处计时,conv.json 里每个 stag
|
||||
|
||||
早期 `grid_status.json` 文件已废弃;当前状态统计由服务端 API 实时查询 DB 提供:
|
||||
|
||||
- `GET /api/workflows`:各工作流内联进度(total/converged/failed/running…)
|
||||
- `GET /api/workflows`:各工作流内联进度(total/completed/failed/running…,`completed` 由 7c 改名自 `converged`)
|
||||
- `GET /api/workflows/:name/stats`:单工作流统计(含 `cold_run_converged` / `seed_step_converged`)
|
||||
- `GET /api/workflows/:name/points`:逐点列表(可过滤 status/method/wave/q,分页)
|
||||
- `GET /api/workflows/:name/progress`:进度-时间序列曲线
|
||||
- 种子步进命中数 = `tasks` 表 `task_type='seed_step'` 且 `status='completed'` 的聚合
|
||||
- 种子步进命中数 = `tasks` 表 `json_extract(tlusty_strategies,'$[0]')='seed_step'` 且 `status='completed'` 的聚合
|
||||
|
||||
前端 Dashboard 直接消费以上端点渲染(首页卡片、详情页概览/点表/平行集合分析图)。
|
||||
|
||||
@@ -291,14 +292,17 @@ grid:
|
||||
logn: [-4, -2, -1]
|
||||
logo: [-4, -2, -1]
|
||||
# 共 4*2*2*3*3*3 = 432 个点
|
||||
tlusty:
|
||||
tlusty_stage: # TLUSTY 阶段独立配置(enabled/policy/strategies)
|
||||
enabled: true
|
||||
policy: skip_converged
|
||||
strategies: ["cold_run", "seed_step"] # 策略链:冷启动失败回退种子步进
|
||||
synspec:
|
||||
synspec_stage: # SYNSPEC 阶段独立配置(enabled/policy/strategies)
|
||||
enabled: true
|
||||
wstart: 3000
|
||||
wend: 7000
|
||||
policy: skip_converged
|
||||
strategies: ["standard"]
|
||||
synspec_input: # SYNSPEC 数值参数(fort.55 波长范围等)
|
||||
wstart: 3000.0
|
||||
wend: 7000.0
|
||||
```
|
||||
|
||||
### 第2步:创建并启动工作流(HTTP API / Dashboard)
|
||||
|
||||
Reference in New Issue
Block a user