-
-
Notifications
You must be signed in to change notification settings - Fork 378
Closed
Description
Sometimes, there are use-cases where you want to entirely pause processing of some tasks, and then later scale back up. CapacityLimiter is basically perfect for this kind of thing, except that it currently raises an error if you pass total_tokens=0:
Lines 254 to 255 in d988edd
| if new_total_tokens < 1: | |
| raise ValueError("total_tokens must be >= 1") |
It's already possible to get the desired effect just by deliberately "leaking" one of the tokens, but it would be much nicer to simply allow zero as the intended capacity, by editing the numbers in the setter above.
CoolCat467 and stereobutter