Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions benchmarks/utils/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import asyncio
import base64
import gc
import json
import os
import tarfile
Expand Down Expand Up @@ -649,6 +650,11 @@ async def attempt_on_result_async(
# from the attempt files, not from this in-memory list.
out.history = []

# Flush cyclic-GC objects. RemoteConversation holds a circular
# reference via its WebSocket callback closure, so CPython's
# reference counter can't free it immediately on scope exit.
gc.collect()

attempt_outputs.append(out)

# Run evaluation for this attempt using asyncio
Expand Down
Loading