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

[python] fix last token fetch logic #2423

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

sindhuvahinis
Copy link
Contributor

@sindhuvahinis sindhuvahinis commented Oct 8, 2024

Description

When exception occurs in inference, we catch it and set the last token as dummy token. So atleast one token should be set, even if exception occurred.

But to check whether last_token_index is set or not, we check if _last_token_index will be false when last_token_index=0.

This PR reverts the yesterday's PR.

Tested it manually in my ec2 machine

@sindhuvahinis sindhuvahinis requested review from zachgk and a team as code owners October 8, 2024 22:53
@sindhuvahinis sindhuvahinis merged commit 79d0c3e into deepjavalibrary:master Oct 9, 2024
9 checks passed
sindhuvahinis added a commit to sindhuvahinis/djl-serving that referenced this pull request Oct 9, 2024
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