debug: add submission logging

This commit is contained in:
2026-07-21 18:24:41 +08:00
parent 020964d3b3
commit 5cd21c1128

View File

@@ -1,6 +1,9 @@
from app.clients.modelhub import ModelHubClient from app.clients.modelhub import ModelHubClient
from app.domain.vllm_configs import gen_vllm_config from app.domain.vllm_configs import gen_vllm_config
from app.storage.repositories import Repository, future_seconds from app.storage.repositories import Repository, future_seconds
import logging
LOG = logging.getLogger(__name__)
class Submitter: class Submitter:
@@ -13,6 +16,7 @@ class Submitter:
for task in self.repo.due_tasks(("ready_to_submit",), limit=limit): for task in self.repo.due_tasks(("ready_to_submit",), limit=limit):
config = gen_vllm_config(task["gpu_type"], task["model_id"], task["max_model_len"]) config = gen_vllm_config(task["gpu_type"], task["model_id"], task["max_model_len"])
result = self.client.create_contest_task(task["model_id"], task["gpu_type"], config) result = self.client.create_contest_task(task["model_id"], task["gpu_type"], config)
LOG.info("submit %s / %s / %s -> %s (%s)", task["model_id"], task["gpu_type"], task["source"], result.result, result.message)
self.repo.record_submission_attempt( self.repo.record_submission_attempt(
task["id"], task["id"],
task["model_id"], task["model_id"],