Skip to content

Commit cbf25c8

Browse files
[Bug fix] Fix bugs for dualpipe when using PipelineDatasetPreprocessor (#76212)
1 parent 542184a commit cbf25c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/paddle/distributed/fleet/meta_parallel/dualpipev.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from .pipeline_parallel import (
3535
FakeMicroDataset,
3636
HybridParallelOptimizer,
37+
PipelineDatasetPreprocessor,
3738
PipelineParallel,
3839
)
3940
from .pp_utils.batch_comm_helper import BatchCommHelper
@@ -634,6 +635,9 @@ def _wrap_data(self, data, phase):
634635
"""
635636
for backward compatibility, wrap data to Fake FakeMicroDataset if it is of type list or tuple
636637
"""
638+
if isinstance(data, PipelineDatasetPreprocessor):
639+
data = data()
640+
637641
if (not isinstance(data, tuple)) and (not isinstance(data, list)):
638642
return data
639643

0 commit comments

Comments
 (0)