feat: inject run_id as cache_salt for per-epoch resampling (algo #10)
This commit is contained in:
@@ -388,6 +388,7 @@ async def _run_single_question(
|
||||
log: HarnessLog,
|
||||
max_steps: int,
|
||||
plugins: list[object],
|
||||
run_id: str,
|
||||
) -> dict[str, Any]:
|
||||
"""执行单道题目的 Agent 推理。
|
||||
|
||||
@@ -402,6 +403,8 @@ async def _run_single_question(
|
||||
log: HarnessLog 实例(线程安全)。
|
||||
max_steps: AgentLoop 最大步数。
|
||||
plugins: pluggy 插件列表。
|
||||
run_id: 运行标识,用作 cache_salt——run_id 含 _e{epoch} 天然跨 epoch 重采样、
|
||||
同 epoch 续跑命中缓存(算法 #10 透传)。
|
||||
|
||||
返回:
|
||||
预测结果字典(含 video_id, question_id, prediction, answer 等)。
|
||||
@@ -431,6 +434,7 @@ async def _run_single_question(
|
||||
dispatcher,
|
||||
plugins=plugins,
|
||||
session_id=qa.question_id,
|
||||
cache_salt=run_id,
|
||||
)
|
||||
|
||||
result_dict = loop_result.result if isinstance(loop_result.result, dict) else {}
|
||||
@@ -558,6 +562,7 @@ async def run_inference(
|
||||
log=log,
|
||||
max_steps=max_steps,
|
||||
plugins=plugins,
|
||||
run_id=run_id,
|
||||
)
|
||||
logger.info(
|
||||
"[{}/{}] {} QA {} 完成 (stop={})",
|
||||
|
||||
Reference in New Issue
Block a user