fix: prevent stale capacity poisoning and deepen recent-only refill scans
Keep ordinary capacity races from lowering persistent per-account limits. Deepen recent-only discovery within the existing age and quality gates. Add offline regressions for recovery and reserved-slot refill.
This commit is contained in:
@@ -1029,7 +1029,12 @@ class ModelHubClientPool:
|
||||
self._capacity_probe_cooldown_until[index] = (
|
||||
self._capacity_probe_cycle + self._capacity_probe_cooldown_cycles
|
||||
)
|
||||
else:
|
||||
elif self._weekly_target_locked() == index:
|
||||
# Only the scheduled calibration may lower a learned cap.
|
||||
# Ordinary rejection can race with another agent filling this
|
||||
# account; our cached count is not evidence of its capacity.
|
||||
# Persisting it (even zero -> one) strands otherwise usable
|
||||
# positions until the next calibration.
|
||||
observed_capacity = max(1, self._effective_count_locked(index))
|
||||
if observed_capacity < self._account_caps[index]:
|
||||
self._account_caps[index] = observed_capacity
|
||||
|
||||
Reference in New Issue
Block a user