Skip to content
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
3 changes: 0 additions & 3 deletions nemo_rl/algorithms/grpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,9 +1779,6 @@ def async_grpo_train(
train_results, metrics, timing_metrics, master_config
)

if "per_worker_token_counts" in metrics:
del metrics["per_worker_token_counts"]

logger.log_metrics(performance_metrics, step + 1, prefix="performance")
logger.log_metrics(metrics, step + 1, prefix="train")
logger.log_metrics(timing_metrics, step + 1, prefix="timing/train")
Expand Down
9 changes: 9 additions & 0 deletions nemo_rl/algorithms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,15 @@ def visualize_per_worker_load(per_worker_token_counts: dict[int, int]) -> float:
total_tflops / theoretical_tflops
)

# =====================================================
# Clean up metrics
# =====================================================

# Clean up metrics to avoid wandb logging errors
# Dict structures cannot be logged to wandb
if "per_worker_token_counts" in metrics:
del metrics["per_worker_token_counts"]

# =====================================================
# Logging
# =====================================================
Expand Down
Loading