Skip to main content
Applies to:
  • Plan -
  • Deployment -

Summary

Issue: Downloading JSON exports for large experiments from the Braintrust UI fails with a malloc of size 1073741824 failed error or times out during the download process. Cause: The UI attempts to load the entire dataset into memory at once, causing memory allocation failures for experiments with thousands of records. Resolution: Use the Braintrust API or SDK to paginate and export large experiment data programmatically.

Resolution Steps

Option 1: Export using TypeScript/JavaScript

Step 1: Create export script

Create a script that paginates through experiment data in chunks of 200 records.

Step 2: Run the script

Execute the script to generate experiment_data.json in your current directory.

Option 2: Export using Python

Step 1: Create export script

Use the Python SDK to fetch and export experiment data with pagination.

Step 2: Run the script

Execute the script to generate experiment_data.json in your current directory.

Option 3: Export to CSV format

Step 1: Modify the script to write CSV

Replace JSON output with CSV writer for spreadsheet compatibility.

Additional Notes

A feature request exists to improve UI performance for large experiment downloads, including async export with email notification when ready. Until implemented, API-based exports are the recommended approach for datasets with more than 1000 records.