Export evaluation items to a file
Export all evaluation items for a single evaluation as a downloadable file.
The evaluation is specified by evaluation_id in the request body. export_format
selects CSV, JSON, or JSONL; for CSV the per-item data and files fields are
flattened into individual columns and metric-like result columns are expanded.
export_method controls delivery: direct returns the file contents inline in the
response, while signed_url uploads the file to object storage and returns a
pre-signed download URL. Requesting signed_url in an environment where object
storage is not configured fails with a 501, so use direct there instead. Set
include_archived=true to include archived items in the export. This endpoint reads
items only and does not modify the evaluation.
Export evaluation items to a file
import os
from scale_gp_beta import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
evaluation_item_export = client.evaluation_items.export(
evaluation_id="evaluation_id",
)
print(evaluation_item_export.filename){
"filename": "filename",
"content": "content",
"signed_url": "signed_url"
}Returns Examples
{
"filename": "filename",
"content": "content",
"signed_url": "signed_url"
}