整合求解器活动监控与步长回归证据
同步远端 PNL0003 诊断和大采样网格能力,语义合并活动感知的 60 秒真停滞判定与旧后端 15 分钟兼容兜底。 纳管热路径优化、15 单元运行证据、浏览器与 API 报告,并补充北京时间更新日志和遗留问题。
This commit is contained in:
1 parent
c19cf77aee
commit
e18399c022
46 files changed
+181589
-170
No files matched your search
@@ -378,13 +378,7 @@ class CausalNumericIR:
|
||||
workspace.effort_written[output] = True
|
||||
except MemoryError:
|
||||
raise
|
||||
except (
|
||||
ArithmeticError,
|
||||
IndexError,
|
||||
RuntimeError,
|
||||
TypeError,
|
||||
ValueError,
|
||||
) as exc:
|
||||
except Exception as exc:
|
||||
return failed(f"effortEvaluationFailed:{type(exc).__name__}")
|
||||
if any(not bool(workspace.effort_written[index]) for index in range(width)):
|
||||
return failed("effortEvaluationCoverageMismatch")
|
||||
@@ -530,6 +524,7 @@ def _unique_slots(items: Iterable[int]) -> tuple[int, ...]:
|
||||
def _compile_effort_evaluations(
|
||||
operations: tuple[CausalIREffortOperation, ...],
|
||||
anchor_evaluators: tuple[Callable[[], float], ...],
|
||||
direct_residuals: tuple[bool, ...],
|
||||
component_locations: dict[
|
||||
str, tuple[object, Callable[[], tuple[float, ...]], int]
|
||||
],
|
||||
@@ -538,10 +533,14 @@ def _compile_effort_evaluations(
|
||||
grouped: dict[int, list[tuple[int, int, str]]] = {}
|
||||
component_callbacks: dict[int, Callable[[], tuple[float, ...]]] = {}
|
||||
direct: list[tuple[int, Callable[[], float], str]] = []
|
||||
for output, (operation, anchor_evaluate) in enumerate(
|
||||
zip(operations, anchor_evaluators)
|
||||
for output, (operation, anchor_evaluate, direct_residual) in enumerate(
|
||||
zip(operations, anchor_evaluators, direct_residuals)
|
||||
):
|
||||
location = component_locations.get(operation.equation_id)
|
||||
location = (
|
||||
None
|
||||
if direct_residual
|
||||
else component_locations.get(operation.equation_id)
|
||||
)
|
||||
if location is None:
|
||||
direct.append((output, anchor_evaluate, operation.equation_id))
|
||||
continue
|
||||
@@ -638,6 +637,7 @@ def compile_causal_numeric_ir(solver: object) -> CausalIRCompilation:
|
||||
for variable in ("p", "x", "v"):
|
||||
operations: list[CausalIREffortOperation] = []
|
||||
anchors: list[Callable[[], float]] = []
|
||||
direct_residuals: list[bool] = []
|
||||
for assignment in effort_plan[variable]:
|
||||
result = len(canonical_slots)
|
||||
equation_id = str(assignment.anchor.equation_id)
|
||||
@@ -665,7 +665,17 @@ def compile_causal_numeric_ir(solver: object) -> CausalIRCompilation:
|
||||
equation_id,
|
||||
)
|
||||
)
|
||||
anchors.append(assignment.anchor.evaluate)
|
||||
causal_evaluate = getattr(
|
||||
assignment.anchor,
|
||||
"causal_evaluate",
|
||||
None,
|
||||
)
|
||||
anchors.append(
|
||||
causal_evaluate
|
||||
if causal_evaluate is not None
|
||||
else assignment.anchor.evaluate
|
||||
)
|
||||
direct_residuals.append(causal_evaluate is not None)
|
||||
operation_tuple = tuple(operations)
|
||||
effort_stages.append(
|
||||
CausalIREffortStage(
|
||||
@@ -674,6 +684,7 @@ def compile_causal_numeric_ir(solver: object) -> CausalIRCompilation:
|
||||
_compile_effort_evaluations(
|
||||
operation_tuple,
|
||||
tuple(anchors),
|
||||
tuple(direct_residuals),
|
||||
component_locations,
|
||||
evaluators,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user