read_jsonl - Tinker Documentation

tinker_cookbook.utils.read_jsonl

tinker_cookbook.utils.read_jsonl ( path)

Read a JSONL (JSON Lines) file and return a list of parsed dictionaries.

Each line in the file is expected to be a valid JSON object.

Parameters:

Returns: list[dict] – List of dictionaries, one per line in the file.

records = read_jsonl("metrics.jsonl")
for record in records:
    print(record["step"], record["loss"])