verl icon indicating copy to clipboard operation
verl copied to clipboard

[feat] add val_generations_to_log_to_swanlab

Open Zeyi-Lin opened this issue 3 months ago • 2 comments

In this PR, a val_generations_to_log_to_swanlab parameter has been added. When this parameter is set to 1, it supports logging the generated text from eval in SwanLab.

@hiyouga


This pull request introduces logging of validation generations to Swanlab in addition to Wandb. The changes include updates to several configuration files and the addition of a new logging method in the ray_trainer.py file.

Key changes include:

Configuration Updates:

  • Added val_generations_to_log_to_swanlab parameter to the trainer section in the following configuration files:
    • examples/split_placement/config/ppo_trainer_split.yaml
    • verl/trainer/config/ppo_megatron_trainer.yaml
    • verl/trainer/config/ppo_trainer.yaml

Code Updates:

  • Added a new method _maybe_log_val_generations_to_swanlab to log validation samples to Swanlab in verl/trainer/ppo/ray_trainer.py
  • Updated the _validate method to call the new Swanlab logging method in verl/trainer/ppo/ray_trainer.py

Zeyi-Lin avatar Mar 05 '25 08:03 Zeyi-Lin