-
Notifications
You must be signed in to change notification settings - Fork 144
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
unexpected output for HF model with matching #294
Comments
context for the issue: With batching enabled, we expect the predict method to return a list of predictions. And when user don't implement The list(prediction_output) in this case was a string which got split by character. So, we need to warn the users in this case. |
I'd like to fix that. @aniketmaurya Will raise a PR. Thanks. |
@grumpyp looking forward! pls let me know if you have any question |
Would you want to prevent this to happen, or can you think of cases where this is needed - so I'll only add a warning in case |
* fix: add warning unexpected output from HF model (closes #294) * add: warning if batched loop return string * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move output check to unbatch_no_stream * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * restore format loops.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: lint E501 Line too long * Update tests/test_batch.py Co-authored-by: Aniket Maurya <theaniketmaurya@gmail.com> * Update src/litserve/api.py Co-authored-by: Aniket Maurya <theaniketmaurya@gmail.com> * Update test to match new warning string * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Delete whitespace in warning string test_batch * Update test_batch.py * Update test_batch.py * Update warning copy * update test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix test * fix Pyright issues in README examples, init parameter naming in LitAPI * remove test from outdated * cleanup * add Any return type * revert * add host parameter to LitServer run method * revert change in api.py * add: tests and validation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Aniket Maurya <theaniketmaurya@gmail.com>
🐛 Bug
To Reproduce
without batching all works as expected
but with batch, it returns just the first character
Code sample
Expected behavior
Environment
If you published a Studio with your bug report, we can automatically get this information. Otherwise, please describe:
conda
,pip
, source):Additional context
The text was updated successfully, but these errors were encountered: