verl icon indicating copy to clipboard operation
verl copied to clipboard

[Feature] wandb resume run option

Open SamComber opened this issue 1 year ago • 5 comments

Hey !

Would it be possible to store the wandb run ID to allow users to optionally resume their existing run instead of spawning a fresh run? i.e. as per https://docs.wandb.ai/guides/runs/resuming/

My hardware has intermittent failures, and piecing together the wandb metrics across broken runs becomes quite tedious.

SamComber avatar Jul 28 '25 15:07 SamComber

meets the same problem, any way to solve it?

MouseSheep99 avatar Sep 15 '25 13:09 MouseSheep99

the same

Harris-Xie avatar Oct 17 '25 10:10 Harris-Xie

Is there any progress here?

Prathyusha-Guduru avatar Feb 03 '26 21:02 Prathyusha-Guduru

中文:

我看了当前代码和配置,这个请求目前看起来仍然是有效的功能需求,而不是已经由 trainer.resume_mode 完整覆盖的问题。

当前 verl.utils.tracking.Tracking 初始化 W&B 时只传入 project、name、entity、config 和 settings,没有从 verl 配置中传入 W&B 的 id / resume 参数。trainer.resume_mode / trainer.resume_from_path 目前用于恢复训练 checkpoint;它可以恢复训练步数和 checkpoint,但不等价于恢复同一个 W&B run。

一个可行方向是为 W&B logger 增加可选配置,例如 trainer.wandb_run_id 和 trainer.wandb_resume,并在 checkpoint 目录中持久化 run id;或者在文档中明确说明用户可以通过 WANDB_RUN_ID / WANDB_RESUME 环境变量尝试 W&B 原生恢复。实现时需要注意多进程/多节点场景,避免多个进程同时用同一个 W&B run id 初始化。

English:

I checked the current code and configuration, and this still looks like a valid feature request rather than something fully covered by trainer.resume_mode.

Today, verl.utils.tracking.Tracking initializes W&B with project, name, entity, config, and settings, but it does not pass a W&B id or resume option from verl config. trainer.resume_mode / trainer.resume_from_path are checkpoint-resume controls; they can resume training state, but they do not necessarily resume logging into the same W&B run.

A reasonable implementation path would be to add optional W&B-specific settings such as trainer.wandb_run_id and trainer.wandb_resume, and persist the run id in the checkpoint directory; alternatively, the docs could clarify that users may try W&B's native WANDB_RUN_ID / WANDB_RESUME environment variables. Any implementation should handle distributed training carefully so that multiple processes do not incorrectly initialize the same W&B run id concurrently.

This response was generated by a scheduled Codex GPT5.5 issue processing task.

Kirrito-k423 avatar Jul 13 '26 01:07 Kirrito-k423

Hi maintainers, I audited current main and confirmed that Tracking calls wandb.init() without explicit id or resume arguments, while checkpoint resume and W&B run resume remain separate concerns. Before implementing #2783, would you prefer a small first PR that adds explicit default-off W&B run_id/resume configuration across PPO, V1, and SFT with CPU mock tests, or should the run ID also be persisted and restored through the checkpoint lifecycle in the initial implementation? I will wait for the intended scope before coding to avoid introducing ambiguous resume semantics.

zupengwang avatar Aug 10 '26 02:08 zupengwang