Skip to content

formatting json file with benchmark results #371

@psydok

Description

@psydok

Is your feature request related to a problem? Please describe.
It is not convenient to view a json file with benchmark results. Everything is in 1 line, you have to install additional extensions to parse or resave the file.

Describe the solution you'd like
Formatting when saving a json file.

Describe alternatives you've considered
installing prettifyjson or resaving the file.
I would also suggest considering the option of splitting files: with prompta and model responses and with metrics, as llmperf does.

Additional context

def save_json(data, file_to_save):
    with open(file_to_save, 'w', encoding='utf-8') as file:
        json.dump(data, file, ensure_ascii=False, indent=4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions