exporters
ipw.execution.exporters
¶
Export functions for agent run traces and profiling records.
export_jsonl(traces, path)
¶
Export traces as JSONL (one JSON object per line).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
traces
|
list[QueryTrace]
|
List of QueryTrace objects to export. |
required |
path
|
Path
|
Output file path. Parent directories are created if needed. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The path to the written file. |
Source code in intelligence-per-watt/src/ipw/execution/exporters.py
export_hf_dataset(traces, path)
¶
Export traces as a HuggingFace Arrow dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
traces
|
list[QueryTrace]
|
List of QueryTrace objects to export. |
required |
path
|
Path
|
Output directory for the Arrow dataset. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The path to the saved dataset directory. |
Source code in intelligence-per-watt/src/ipw/execution/exporters.py
export_summary_json(traces, config, path)
¶
Export aggregate summary as JSON.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
traces
|
list[QueryTrace]
|
List of QueryTrace objects. |
required |
config
|
dict[str, Any]
|
Run configuration dictionary. |
required |
path
|
Path
|
Output file path. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
The path to the written file. |