fix: 无本地同地区基准时自相关通过并记为零
Deploy production / deploy (push) Successful in 56s

This commit is contained in:
yuxuanhui
2026-09-10 13:16:52 +08:00
parent 758925edb8
commit 37e390a073
4 changed files with 58 additions and 4 deletions
+7 -2
View File
@@ -515,7 +515,7 @@ class Runner:
async def check_correlations(self, job_id, alpha_ids):
"""Check fixed targets against same-region submitted caches, with per-target recovery.
Missing references are reported as incomplete coverage. Authentication,
An empty same-region reference set passes locally with correlation zero. Authentication,
transient upstream errors and cancellation retain the task for retry.
"""
await self.checkpoint(job_id, {"total": len(alpha_ids)})
@@ -564,7 +564,12 @@ class Runner:
result["reason"] = "平台未提供目标 Alpha 的地区"
elif not reference_ids:
result = calculate_correlation([], [])
result["reason"] = "没有同地区已提交 Alpha 可供比较,请先同步已提交 Alpha"
# A local policy default, not a measured Pearson coefficient.
result.update(
status="low",
max_correlation=0.0,
reason="没有同地区已提交 Alpha 可供比较,按本地规则视为通过,自相关值记为 0",
)
else:
target = await self.correlation_pnl(job_id, alpha_id)
references = []