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

[Feature Request]: EmbeddingQAFinetuneDataset save_json add kwargs #13789

Open
danerlt opened this issue May 29, 2024 · 0 comments
Open

[Feature Request]: EmbeddingQAFinetuneDataset save_json add kwargs #13789

danerlt opened this issue May 29, 2024 · 0 comments
Labels
enhancement New feature or request triage Issue needs to be triaged/prioritized

Comments

@danerlt
Copy link

danerlt commented May 29, 2024

Feature Description

I want to pass the parameters of json.dump when using the save_json method of EmbeddingQAFinetuneDataset object.

Reason

When the text contains Chinese characters, they are saved as Unicode characters in a JSON file and cannot be displayed properly as Chinese characters.
image

Value of Feature

I can easily view the contents of JSON files.

code:

    def save_json(self, path: str, **kwargs) -> None:
        """Save json."""
        with open(path, "w") as f:
            json.dump(self.dict(), f, indent=4, **kwargs)
@danerlt danerlt added enhancement New feature or request triage Issue needs to be triaged/prioritized labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Issue needs to be triaged/prioritized
Projects
None yet
Development

No branches or pull requests

1 participant