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

Fix string UTF-8 misformatting PANIC #114

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Fix string UTF-8 misformatting PANIC #114

merged 1 commit into from
Aug 14, 2024

Conversation

Peiyang-Song
Copy link
Member

This PR fixes the PANIC observed in Issue #113. Apparently the bytes generated from the tokens can potentially be invalid, in which case we return an empty string. This introduces no functional changes other than getting rid of the reported PANIC.

The exact position this warning was throwed is line 40 in ModelAPIs.lean. The ultimate cause is in ByT5.lean that we modify in this PR.

@Peiyang-Song Peiyang-Song self-assigned this Aug 14, 2024
@Peiyang-Song Peiyang-Song merged commit 88e50cb into main Aug 14, 2024
1 check passed
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.

1 participant