JSONReporter#
- class eclypse.report.reporters.json.JSONReporter[source]#
Bases:
ReporterClass to report the simulation metrics in JSON lines format.
Methods
__init__(report_path)Initialize the JSON reporter.
close()Close all open JSONL file handles.
report(event_name, event_idx, callback)Reports the callback values in JSON lines format.
write(callback_type, data)Write the JSON lines report to a file.
- report(event_name, event_idx, callback)[source]#
Reports the callback values in JSON lines format.
- Parameters:
event_name (str) – The name of the event.
event_idx (int) – The index of the event trigger (step).
callback (EclypseEvent) – The executed callback containing the data to report.
- Returns:
JSON lines entries to report lazily.
- Return type:
Generator[dict[str, Any], None, None]