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

Enable batch-unbatch by default #220

Merged
merged 4 commits into from
Aug 26, 2024
Merged

Enable batch-unbatch by default #220

merged 4 commits into from
Aug 26, 2024

Conversation

aniketmaurya
Copy link
Collaborator

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?

What does this PR do?

This PR makes LitAPI.batch and LitAPI.unbatch enable by default where it returns the input and output as list if not implemented.

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 self-assigned this Aug 25, 2024
@aniketmaurya aniketmaurya added the enhancement New feature or request label Aug 25, 2024
Copy link

codecov bot commented Aug 25, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 82%. Comparing base (144476b) to head (429e014).
Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #220   +/-   ##
===================================
+ Coverage    80%    82%   +1%     
===================================
  Files        13     13           
  Lines      1057   1048    -9     
===================================
+ Hits        850    855    +5     
+ Misses      207    193   -14     

@aniketmaurya aniketmaurya enabled auto-merge (squash) August 26, 2024 02:13
Copy link
Collaborator

@lantiga lantiga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

Caveat: this

def no_batch_unbatch_message_no_stream(obj, data):

and
def no_batch_unbatch_message_stream(obj, data):

are now both unused and the error message is inaccurate. We could just remove.

At first I thought we could catch an exception but the error from incorrect batching would show up in predict and encode_response, so I don't think we can catch it without producing confusing false positives.

@aniketmaurya aniketmaurya merged commit a65fadf into main Aug 26, 2024
20 checks passed
@aniketmaurya aniketmaurya deleted the aniket/batch-by-default branch August 26, 2024 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants