fix(runner): 14 Facade kwargs 兜底 + 4 spec parameter_map 修正 + step6_75 路由切到 indices
- 14 个 stepX_... Facade 形参表末尾加 **kwargs,杜绝 Runner 注入未声明 key 时的 TypeError(典型:step3 收到 glint_mask_path) - runner._invoke user_overrides 合并加 v is not None and v != '' 过滤,避免 GUI 面板空值覆盖 ctx 中已写入的有效路径 - PIPELINE_STEPS 加 4 个 parameter_map 修正 ctx 字段名→形参名错位:step6_5/6_75: training_csv_path→csv_path;step8_5: models_dir→non_empirical_models_dir;step8_75: models_dir→custom_regression_dir - step6_75 路由从 training_csv_path 切到 indices_path(requires + parameter_map 同步);配合 skip_when_missing,未跑 step5_5 时自动 skip - worker_thread.py: mode='full' 切到 PipelineRunner + PipelineContext 调度
This commit is contained in:
@ -84,11 +84,13 @@ PIPELINE_STEPS: List[StepSpec] = [
|
||||
StepSpec(
|
||||
step_id="step6_5", method_name="step6_5_non_empirical_modeling",
|
||||
requires=["training_csv_path"], produces=["models_dir"],
|
||||
parameter_map={"training_csv_path": "csv_path"},
|
||||
description="非经验统计回归",
|
||||
),
|
||||
StepSpec(
|
||||
step_id="step6_75", method_name="step6_75_custom_regression",
|
||||
requires=["training_csv_path"], produces=["models_dir"],
|
||||
requires=["indices_path"], produces=["models_dir"],
|
||||
parameter_map={"indices_path": "csv_path"},
|
||||
description="自定义回归分析",
|
||||
),
|
||||
StepSpec(
|
||||
@ -104,12 +106,14 @@ PIPELINE_STEPS: List[StepSpec] = [
|
||||
StepSpec(
|
||||
step_id="step8_5", method_name="step8_5_predict_with_non_empirical_models",
|
||||
requires=["sampling_csv_path", "models_dir"], produces=["prediction_dir"],
|
||||
parameter_map={"models_dir": "non_empirical_models_dir"},
|
||||
description="非经验模型预测",
|
||||
),
|
||||
StepSpec(
|
||||
step_id="step8_75", method_name="step8_75_predict_with_custom_regression",
|
||||
requires=["sampling_csv_path", "models_dir", "formula_csv_path"],
|
||||
produces=["prediction_dir"],
|
||||
parameter_map={"models_dir": "custom_regression_dir"},
|
||||
description="自定义回归预测",
|
||||
),
|
||||
StepSpec(
|
||||
@ -185,7 +189,10 @@ class PipelineRunner:
|
||||
# 2) 允许用户在 ctx.user_config[step_id] 覆盖/补充
|
||||
user_overrides = ctx.user_config.get(spec.step_id) or {}
|
||||
if isinstance(user_overrides, dict):
|
||||
kwargs.update(user_overrides)
|
||||
for k, v in user_overrides.items():
|
||||
# ★ 关键防御:绝不用 GUI 的“空字符串”或 None 覆盖上游传来的有效路径
|
||||
if v is not None and v != "":
|
||||
kwargs[k] = v
|
||||
|
||||
# 3) 状态置 start
|
||||
ctx.append_log(
|
||||
|
||||
Reference in New Issue
Block a user