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

Output format of samples has been changed #1493

Open
christyler3030 opened this issue Feb 28, 2024 · 1 comment
Open

Output format of samples has been changed #1493

christyler3030 opened this issue Feb 28, 2024 · 1 comment
Assignees
Labels
bug Something isn't working.

Comments

@christyler3030
Copy link

Unless I am missing something this commit changed the format of the saved samples (when log_samples is true.) Previously the samples were saved as jsonlines in a jsonl file but now they are saved as a serialized json list. A fix that maintains the improved serialization of the above commit but also maintains the jsonlines format should be pretty simple; something like:
json_lines = [json.dumps(sample, default=_handle_non_serializable, ensure_ascii=False, ) for sample in samples[task_name]]
filename.write_text(json_lines, encoding="utf-8")

I am happy to implement the fix but I wanted to confirm what the intent was here. Do you want to save as jsonlines or a json list.

@haileyschoelkopf
Copy link
Contributor

Hi! Thanks for reporting this. Indeed Jsonlines is what is desired--if you could implement the fix that would be fantastic!

We'd have to do a quick check to confirm that our Zeno integration and WandB integration which log samples are not broken by this behavior though.

@haileyschoelkopf haileyschoelkopf added the bug Something isn't working. label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
Status: In progress
Development

No branches or pull requests

2 participants