Skip to content

Conversation

@EasonZhong668
Copy link
Contributor

What does this PR do?

This PR adds support for logging Config parameters to Weights & Biases (wandb) when running SFT training via fsdp_sft_trainer.py.

Previously, wandb overview panel did not include configuration details, making it harder to trace experiment setups, as shown below:
image
This PR ensures that all relevant config parameters are recorded, improving reproducibility and experiment tracking:
image

Checklist Before Starting

  • Search for similar PRs. Paste at least one query link here: ...
  • Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI)
    • {modules} include fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data
    • If this PR involves multiple modules, separate them with , like [megatron, fsdp, doc]
    • {type} is in feat, fix, refactor, chore, test
    • If this PR breaks any API (CLI arguments, config, function signature, etc.), add [BREAKING] to the beginning of the title.
    • Example: [BREAKING][fsdp, megatron] feat: dynamic batching

Test

For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc.

torchrun --nnodes=1 --nproc_per_node=8
-m verl.trainer.fsdp_sft_trainer
data.train_files=/root/data/gsm8k/train.parquet
data.val_files=/root/data/gsm8k/test.parquet
data.train_batch_size=1024
data.prompt_key=extra_info
data.response_key=extra_info
data.prompt_dict_keys=['question']
data.response_dict_keys=['answer']
data.micro_batch_size_per_gpu=4
model.partial_pretrain=Qwen/Qwen2.5-7B-Instruct
optim.lr=1e-5
optim.betas='[0.9,0.95]'
optim.weight_decay=0.01
optim.warmup_steps_ratio=0.05
optim.clip_grad=1.0
optim.lr_scheduler=cosine
trainer.default_local_dir=/workspace/verl/checkpoints/sft/gsm8k/qwen-7b
trainer.project_name=gsm8k-sft
trainer.experiment_name=gsm8k-sft-qwen-7b
trainer.total_epochs=4
trainer.logger='["wandb"]'
image

API and Usage Example

Demonstrate how the API changes if any, and provide usage example(s) if possible.

# Add code snippet or script demonstrating how to use this

Design & Code Changes

Demonstrate the high-level design if this PR is complex, and list the specific changes.

Checklist Before Submitting

Important

Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for logging configuration parameters to Weights & Biases, improving experiment tracking and reproducibility. The implementation is straightforward. The review includes one high-severity comment regarding the placement of an import statement to ensure consistency and adherence to Python's standard style guide (PEP 8).

@eric-haibin-lin eric-haibin-lin merged commit 4e9d287 into volcengine:main Aug 4, 2025
13 checks passed
@eric-haibin-lin
Copy link
Collaborator

Merged. Thx!

Juniper1021 pushed a commit to Juniper1021/verl that referenced this pull request Aug 7, 2025
HaeChan0305 pushed a commit to HaeChan0305/MLILAB-GRPO that referenced this pull request Aug 8, 2025
yellowbee686 pushed a commit to yellowbee686/verl that referenced this pull request Aug 11, 2025
whatadayG pushed a commit to whatadayG/verl that referenced this pull request Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants