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

allow non ascii characters in compiled prompts #1912

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RawEnchilada
Copy link

@RawEnchilada RawEnchilada commented Dec 9, 2024

Adds an optional ensure_ascii parameter to saving a module, which is consistent with json.dumps declarations.

closes #1911

@okhat okhat requested a review from chenmoneygithub December 9, 2024 17:53
Copy link
Collaborator

@chenmoneygithub chenmoneygithub left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Can we use a try-except block instead of introducing a new arg? IIUC the loading should always work, only saving could cause issue on ascii-only platform. In general we are cautious at introducing new args to public APIs, the longer the arglist, the more confusing it becomes.

@okhat
Copy link
Collaborator

okhat commented Dec 16, 2024

Just so I understand. Do you want to allow ensure_ascii=False? Should we just make it False by default?

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.

Compiled models are saved using ascii characters only
3 participants