Bootstrap architecture rules from task history

This commit is contained in:
CoolBoy
2026-08-12 08:41:07 +08:00
parent 7ec875563e
commit d8ed7fa1c2
12 changed files with 653 additions and 63 deletions

View File

@@ -155,6 +155,9 @@ class ModelHubClient:
end_time: datetime | None = None,
gpu_type: str | None = None,
model_id: str | None = None,
status: str | None = None,
verify_result: int | None = None,
max_records: int = 0,
) -> list[dict[str, Any]]:
current = 1
records: list[dict[str, Any]] = []
@@ -167,10 +170,14 @@ class ModelHubClient:
end_time=end_time,
gpu_type=gpu_type,
model_id=model_id,
status=status,
verify_result=verify_result,
)
page_data = page.get("data") or {}
page_records = page_data.get("records") or []
records.extend(page_records)
if max_records > 0 and len(records) >= max_records:
return records[:max_records]
pages = int(page_data.get("pages") or 0)
if pages <= current or not page_records:
break