Skip to content

踩坑GitHub Physical-Intelligence/openpi8 天前

PI0.5训练保存Checkpoint时终端无报错退出及RAM OOM ​

本文由 AI 根据公开内容整理,可能有误,请以原文为准:During the training process of the PI0.5 model, it automatically exits and the terminal closes without any errors.(GitHub Physical-Intelligence/openpi #827)

状态:有绕过办法

问题 ​

在PI0.5模型训练过程中,程序运行至特定步数(如17.5k步)保存Checkpoint时自动退出且终端关闭,Wandb日志截断无显式报错。经排查确认为系统内存(RAM)OOM而非磁盘空间不足,调整ocp.PyTreeCheckpointHandler的并发参数或禁用异步保存均无效,疑似数据加载或保存过程存在内存泄漏。

环境 ​

SLURM集群环境,双主机各4卡GPU,单机480GB RAM;Physical-Intelligence/openpi仓库;PI0.5模型训练任务。

解决办法 ​

  1. 编写并运行独立的系统缓存清理程序,在训练期间定期释放RAM缓存,实测可支持连续训练42小时以上不触发OOM退出。
  2. 修改src/openpi/training/checkpoints.py第83行,注释掉保存train state的代码逻辑,仅保留模型参数保存以降低峰值内存占用(注意:此法会导致无法完整恢复训练状态)。

讨论原作者:@sunmoon2018 等,版权归原作者所有。

来源

本页事实对应的公开页面,以原文为准。

  1. GitHub Physical-Intelligence/openpi #827:During the training process of the PI0.5 model, it automatically exits and the terminal closes without any errors.访问 2026-10-26