-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[rollout, data] fix: honor train_max_samples/val_max_samples in fully async rollouter #5359
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,8 +98,20 @@ def __init__( | |
| from verl.trainer.main_ppo import create_rl_dataset, create_rl_sampler | ||
| from verl.utils.dataset.rl_dataset import collate_fn | ||
|
|
||
| train_dataset = create_rl_dataset(config.data.train_files, config.data, tokenizer, processor) | ||
| val_dataset = create_rl_dataset(config.data.val_files, config.data, tokenizer, processor) | ||
| train_dataset = create_rl_dataset( | ||
| config.data.train_files, | ||
| config.data, | ||
| tokenizer, | ||
| processor, | ||
| max_samples=config.data.get("train_max_samples", -1), | ||
| ) | ||
| val_dataset = create_rl_dataset( | ||
| config.data.val_files, | ||
| config.data, | ||
| tokenizer, | ||
| processor, | ||
| max_samples=config.data.get("val_max_samples", -1), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Setting |
||
| ) | ||
|
Comment on lines
+108
to
+114
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The call to val_dataset = create_rl_dataset(
config.data.val_files,
config.data,
tokenizer,
processor,
is_train=False,
max_samples=config.data.get("val_max_samples", -1),
) |
||
| train_sampler = create_rl_sampler(config.data, train_dataset) | ||
|
|
||
| self._validate_config() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the main PPO trainer path (
verl/trainer/main_ppo.py) and to ensure the call matches the intended API usage, it is recommended to explicitly passis_train=Truewhen creating the training dataset.