fix: reject broken configs and improve accuracy feedback with isolated agent state

This commit is contained in:
CoolBoy
2026-10-18 16:29:18 +08:00
parent 964362818e
commit 484a10607c
10 changed files with 243 additions and 25 deletions

View File

@@ -22,6 +22,8 @@ from history_stats import classify_failure, is_failure, is_success
from llm_classifier import LLMAssistedClassifier
from modelhub_client import ModelHubClient, ModelHubClientPool
from task_registry import task_type_from_history_task
from common import runtime_instance_id
from version import AGENT_VERSION
DEFAULT_OUTCOMES_PATH = Path("outcomes/submissions.jsonl")
@@ -36,6 +38,7 @@ FAILURE_ENRICHMENT_MAX_ATTEMPTS = 3
TERMINAL_TASK_STATUSES = {"success", "failed", "error", "cancelled", "completed"}
DECISION_RECORD_FIELDS = {
"agentVersion", "instanceId", "strategyId",
"taskId",
"modelId",
"targetGpu",
@@ -325,6 +328,9 @@ class OutcomeTracker:
model_profile: dict[str, Any] | None = None,
) -> None:
record: dict[str, Any] = {
"agentVersion": AGENT_VERSION,
"instanceId": runtime_instance_id(),
"strategyId": os.getenv("STRATEGY_ID"),
"modelId": model_id,
"targetGpu": target_gpu,
"framework": framework,