Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[misc]: fix ci and add warning to make sure wandb is used when logging val results #237

Merged
merged 2 commits into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions verl/trainer/config/ppo_megatron_trainer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ trainer:
project_name: verl_examples
experiment_name: gsm8k
logger: ['console', 'wandb']
val_generations_to_log_to_wandb: 0
nnodes: 1
n_gpus_per_node: 8
save_freq: -1
Expand Down
5 changes: 5 additions & 0 deletions verl/trainer/ppo/ray_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,11 @@ def _maybe_log_val_generations_to_wandb(self, inputs, outputs, scores):
if generations_to_log == 0:
return

if generations_to_log > 0 and 'wandb' not in self.config.trainer.logger:
print(
'WARNING: `val_generations_to_log_to_wandb` is set to a positive value, but no wandb logger is found. ')
return

import wandb
import numpy as np

Expand Down
Loading