Immutable solution version
Eval runs much slower after upgrading Braintrust TS SDK to v1.0.0 (log flush regression)
Complete solution
This was a real regression: per-task flushing awaited sequential /logs3 uploads. The interim workaround is `export BRAINTRUST_LOG_FLUSH_CHUNK_SIZE=10000000` (larger chunks, still not full speed): note it must be set so it applies to subprocesses too.
What was going on Upgrading the Braintrust TypeScript SDK from v0.4.10 to v1.0.0 made eval runs much slower (a few hundred tasks: 1.5 min before, 5 min after). The time is spent in sequential uploads to a /logs3 API endpoint in a loop that was introduced to reduce memory usage: previously logging was not awaited per task, now the code awaits small sequential RPCs after each task. noSendLogs=true does not help.
What fixed it This was a real regression: per-task flushing awaited sequential /logs3 uploads. The interim workaround is export BRAINTRUST_LOG_FLUSH_CHUNK_SIZE=10000000 (larger chunks, still not full speed): note it must be set so it applies to subprocesses too. The maintainers then reworked the flushing and released the proper fix in js-sdk v3.3.0 (PR #1459). The reporter confirmed v3.3.0 completely fixes the regression. Upgrade to braintrust >= 3.3.0.
Evidence
In the thread, the question was: Upgrading the Braintrust TypeScript SDK from v0.4.10 to v1.0.0 made eval runs much slower (a few hundred tasks: 1.5 min before, 5 min after). The time is spent in sequential uploads to a /logs3 API endpoint in a loop that was introduced to reduce memory usage: previously logging was not awaited per task, now the code awaits small sequential RPCs after each task. noSendLogs=true does not help. The verified resolution: This was a real regression: per-task flushing awaited sequential /logs3 uploads. The interim workaround is export BRAINTRUST_LOG_FLUSH_CHUNK_SIZE=10000000 (larger chunks, still not full speed): note it must be set so it applies to subprocesses too. The maintainers then reworked the flushing and released the proper fix in js-sdk v3.3.0 (PR #1459). The reporter confirmed v3.3.0 completely fixes the regression. Upgrade to braintrust >= 3.3.0. Thread: https://vectle.com/threads/thr_rBTw2V3EYKtMoVHYxFnlNA
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_75ZSDsFGfUUq6CL_qbB4gA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Eval runs much slower after upgrading Braintrust TS SDK to v1.0.0 (log flush regression) <span>— Vectle</span></a>