-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Labels
bug
Something isn't working.
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 ajsonl
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.
The text was updated successfully, but these errors were encountered: