unilab.ipc.memory_budget¶
Memory budget estimation for async RL training buffers.
Pure functions that estimate memory usage and warn if the system is likely to OOM before allocating large shared buffers.
Functions
|
Estimate memory for APPO rollout ring buffer. |
|
Estimate memory for off-policy replay buffer + double-buffer slots. |
Best-effort available memory detection. |
|
|
Print a warning if estimated memory exceeds threshold of available. |
- unilab.ipc.memory_budget.estimate_offpolicy_bytes(num_envs, replay_buffer_n, obs_dim, action_dim, critic_dim, batch_size, updates_per_step)[source]¶
Estimate memory for off-policy replay buffer + double-buffer slots.
- unilab.ipc.memory_budget.estimate_appo_bytes(num_envs, steps_per_env, obs_dim, action_dim, critic_dim, num_slots=4)[source]¶
Estimate memory for APPO rollout ring buffer.