Skip to content
Draft
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
5 changes: 5 additions & 0 deletions src/prime_rl/orchestrator/orchestrator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import ctypes
import gc
import os
import time
Expand Down Expand Up @@ -797,6 +798,10 @@ def compute_solve_rates(df):
del train_rollouts, train_examples, training_batch, vlm_cache
del results_df, metrics_df
gc.collect()
# Return free glibc heap pages to the OS. numpy/pandas allocate array data
# via malloc (outside Python's allocator), so gc.collect() alone doesn't
# reclaim the RSS. malloc_trim(0) forces glibc to return freed pages.
ctypes.CDLL("libc.so.6").malloc_trim(0)

event_loop_lag_monitor.reset()

Expand Down
Loading