File tree Expand file tree Collapse file tree
src/spdl/autoresearch/pipeline_optimization/_ops Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212import logging
1313from datetime import datetime
1414from pathlib import Path
15+ from typing import TYPE_CHECKING
1516
1617from spdl .autoresearch ._common ._state import (
1718 _append_master_row ,
4243from ._failures import _classify_terminal_job_failure , _failure_note , _make_failure
4344from ._policy import _change_summary_for_spec , _format_best_metric , write_state
4445
46+ if TYPE_CHECKING :
47+ from spdl .autoresearch .core import FailureRecord
48+
4549__all__ : list [str ] = [
4650 "MASTER_TABLE_HEADERS" ,
4751 "_analyze_job" ,
5256
5357_LG : logging .Logger = logging .getLogger (__name__ )
5458
55- MASTER_TABLE_HEADERS = [
59+ MASTER_TABLE_HEADERS : list [ str ] = [
5660 "run_id" ,
5761 "name" ,
5862 "job_id" ,
7074 "notes" ,
7175]
7276
73- _STRUCTURAL_PRACTICES = {"mtp" }
74- _STRUCTURAL_ATTEMPT_THRESHOLD = 3
77+ _STRUCTURAL_PRACTICES : set [ str ] = {"mtp" }
78+ _STRUCTURAL_ATTEMPT_THRESHOLD : int = 3
7579
7680
7781def _analyze_job (
@@ -182,7 +186,7 @@ def _append_master_result_row(
182186 status : str ,
183187 duration : object ,
184188 structured : dict | None ,
185- terminal_failure ,
189+ terminal_failure : FailureRecord | None ,
186190) -> None :
187191 # pyrefly: ignore [bad-assignment]
188192 row : dict [str , str | float ] = {
You can’t perform that action at this time.
0 commit comments