Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async continuous batching loop #401

Merged
merged 19 commits into from
Jan 8, 2025
Merged

Async continuous batching loop #401

merged 19 commits into from
Jan 8, 2025

Conversation

aniketmaurya
Copy link
Collaborator

@aniketmaurya aniketmaurya commented Jan 7, 2025

What does this PR do?

  • Make continuous batching loop async to run prefetch in background
  • Rest of the changes are the reorg for code readability.
litserve/
├── loops/
│   ├── __init__.py
│   ├── base.py                               # Contains the `_BaseLoop`  and `LitLoop` class
│   ├── simple_loops.py                 # Contains the in-built loops for single and simple batched
│   ├── streaming_loops.py           # Contains the in-built loops for single req streaming and batched streaming
│   ├── continuous_batching.py    # Async continuous batching loops
Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@aniketmaurya aniketmaurya changed the title Async continuous batching loop [wip] Async continuous batching loop Jan 7, 2025
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 75.35934% with 120 lines in your changes missing coverage. Please review.

Project coverage is 89%. Comparing base (fd77feb) to head (6cec895).
Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #401    +/-   ##
====================================
- Coverage    91%    89%    -2%     
====================================
  Files        25     30     +5     
  Lines      1783   1902   +119     
====================================
+ Hits       1626   1695    +69     
- Misses      157    207    +50     

@aniketmaurya aniketmaurya changed the title [wip] Async continuous batching loop Async continuous batching loop Jan 7, 2025
@aniketmaurya aniketmaurya enabled auto-merge (squash) January 7, 2025 23:02
@aniketmaurya aniketmaurya merged commit e9b1ee1 into main Jan 8, 2025
21 checks passed
@aniketmaurya aniketmaurya deleted the aniket/optimize-loop branch January 8, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants