fix: resolve Pydantic Literal error preventing pipeline execution

The Run model used a strict Literal['baseline', 'explore', 'validate', 'wfv', 'oos']
for the phase field, but the new pipeline emits phases like 'phase1', 'phase2', etc.
This resulted in a silent validation failure inside the pipeline loop before MT5
was launched, causing the optimizer to appear 'stuck' without ever opening MT5.

Fixed by relaxing the phase field to 'str'.
This commit is contained in:
LEGSTECH Optimizer
2026-04-13 21:31:06 +00:00
parent 47f6012eb2
commit e5dd9550b7
+1 -1
View File
@@ -100,7 +100,7 @@ class Run(BaseModel):
period_start: str
period_end: str
params: dict[str, Any] # snapshot of all EA inputs used
phase: Literal["baseline", "explore", "validate", "wfv", "oos"]
phase: str
hypothesis_id: Optional[str] = None
tester_model: int = 0 # 0=Every Tick
ini_snapshot: Optional[str] = None # full .ini content for reproducibility