Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da5b9f8612 |
32
main.py
32
main.py
@@ -41,12 +41,30 @@ HTTP_PORT = 8080
|
||||
# v1.0.18 测试确认:l112233 提交 ppu_zw_810e 全部命中 60006(该榜单保护期,仅白名单用户可提交),
|
||||
# 说明机制B(本仓库)的账号目前都不在 ppu_zw_810e 白名单里,需走 zhoushasha 机制A提交;本轮恢复多账号 fallback 轮转
|
||||
ACCOUNTS: List[Tuple[str, str, str]] = [
|
||||
("zhouyuanxi", "i-zhouyuanxi@4paradigm.com", "62b9b487eff2488fb9f1da0b963f0b93"),
|
||||
("zhoukaile", "zhoukaile", "bd7c52f3b9604ef48a14dd6174513935"),
|
||||
("zhangyuanxi", "zhangyuanxi", "24ed39f7f0d84fafbe0ca808e62b191c"),
|
||||
("jiajing", "jiajing", "5e051e0ff8384a81af53bea780deb28a"),
|
||||
("jiangxiaowen", "jiangxiaowen", "88d5fee9f1fe4f7583f11a9d3702dc85"),
|
||||
("miaoyao", "miaoyao", "77033cee0fb549598cdd590be0d02983"),
|
||||
("zhao", "zhao", "421e75fb54904eb3a131d5647f299b23"),
|
||||
("l112233", "l112233", "40cb6910dc9a442a816298a228da65ac"),
|
||||
("l11223344", "l11223344", "e1c0db2959e5411f9342c8550b03f6e9"),
|
||||
("keii", "keii", "be99003a85f640d8978823a5a8e3f297"),
|
||||
]
|
||||
|
||||
# 本轮实际参与提交的账号(平均轮转只在这几个之间进行)。
|
||||
# 留空 [] 表示使用 ACCOUNTS 里的全部账号。
|
||||
# v1.1.0 按要求只用这 4 个;其余 6 个保留在 ACCOUNTS 里备用,不会丢失 token。
|
||||
ACTIVE_ACCOUNT_LABELS: List[str] = [
|
||||
"zhangyuanxi", "jiajing", "l112233", "l11223344",
|
||||
]
|
||||
|
||||
ACTIVE_ACCOUNTS: List[Tuple[str, str, str]] = (
|
||||
[a for a in ACCOUNTS if a[0] in ACTIVE_ACCOUNT_LABELS]
|
||||
if ACTIVE_ACCOUNT_LABELS else list(ACCOUNTS)
|
||||
)
|
||||
|
||||
# ══════════════════════════════════════════════════════════
|
||||
# 各 GPU 的模型列表(来自 filter_verified_models 脚本的筛选结果)
|
||||
# ══════════════════════════════════════════════════════════
|
||||
@@ -2035,8 +2053,8 @@ _state = {
|
||||
"total": TOTAL_MODELS,
|
||||
"submitted": 0,
|
||||
"failed": 0,
|
||||
"per_account": {label: 0 for label, _, _ in ACCOUNTS},
|
||||
"current_account": ACCOUNTS[0][0],
|
||||
"per_account": {label: 0 for label, _, _ in ACTIVE_ACCOUNTS},
|
||||
"current_account": ACTIVE_ACCOUNTS[0][0],
|
||||
"started_at": None,
|
||||
"finished_at": None,
|
||||
}
|
||||
@@ -2358,17 +2376,17 @@ def _run_worker():
|
||||
if _shutdown.is_set():
|
||||
break
|
||||
|
||||
if len(exhausted) >= len(ACCOUNTS):
|
||||
if len(exhausted) >= len(ACTIVE_ACCOUNTS):
|
||||
print(f"⏭️ 所有账号额度已用尽,跳过: {model_id} ({gpu_type})", flush=True)
|
||||
_state["failed"] += 1
|
||||
continue
|
||||
|
||||
submitted_ok = False
|
||||
# 从当前轮转位置起,最多把 4 个账号各试一遍
|
||||
for _ in range(len(ACCOUNTS)):
|
||||
idx = rr % len(ACCOUNTS)
|
||||
for _ in range(len(ACTIVE_ACCOUNTS)):
|
||||
idx = rr % len(ACTIVE_ACCOUNTS)
|
||||
rr += 1
|
||||
label, _account, token = ACCOUNTS[idx]
|
||||
label, _account, token = ACTIVE_ACCOUNTS[idx]
|
||||
if label in exhausted:
|
||||
continue
|
||||
_state["current_account"] = label
|
||||
@@ -2381,7 +2399,7 @@ def _run_worker():
|
||||
break
|
||||
elif code == 60007:
|
||||
exhausted.add(label)
|
||||
print(f"⛔ 账号 [{label}] 提交额度已满,本轮不再使用(已满 {len(exhausted)}/{len(ACCOUNTS)})", flush=True)
|
||||
print(f"⛔ 账号 [{label}] 提交额度已满,本轮不再使用(已满 {len(exhausted)}/{len(ACTIVE_ACCOUNTS)})", flush=True)
|
||||
continue
|
||||
else:
|
||||
# 模型自身问题(重复提交/唯一性等),换账号也没用,直接跳过
|
||||
|
||||
Reference in New Issue
Block a user