File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,19 @@ def data_collator(features): # No data collation is needed in GRPO
410
410
self .use_vllm = args .use_vllm
411
411
self .use_liger_loss = args .use_liger_loss
412
412
413
+ # Datasets
414
+ if (
415
+ isinstance (train_dataset , IterableDataset )
416
+ or isinstance (eval_dataset , IterableDataset )
417
+ or (
418
+ isinstance (eval_dataset , dict ) and any (isinstance (ds , IterableDataset ) for ds in eval_dataset .values ())
419
+ )
420
+ ):
421
+ # See https://github.com/huggingface/trl/issues/3213
422
+ raise NotImplementedError (
423
+ "Iterable datasets are not yet supported in GRPOTrainer. Please use a standard dataset instead."
424
+ )
425
+
413
426
# Multi-step
414
427
self .num_iterations = args .num_iterations # = 𝜇 in the GRPO paper
415
428
self .epsilon_low = args .epsilon
You can’t perform that action at this time.
0 commit comments