Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketmaurya committed Dec 10, 2024
1 parent a6eb592 commit 808a4ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/litserve/loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,12 @@ def mark_completed(self, uid: str) -> None:

def has_capacity(self, lit_api: LitAPI) -> bool:
"""Check if we can add more sequences based on current batch."""
return len(self.active_sequences) < lit_api.max_batch_size
capacity = len(self.active_sequences) < lit_api.max_batch_size
if not capacity:
logger.info(
f"No capacity: {len(self.active_sequences)} active sequences, max batch size: {lit_api.max_batch_size}"
)
return capacity

def step(
self, prev_outputs: Optional[List[StepOutput]], lit_api: LitAPI, lit_spec: Optional[LitSpec]
Expand Down

0 comments on commit 808a4ac

Please sign in to comment.