From 51f4d2f80e40e45ea02718e8c6ab4d9441eb8174 Mon Sep 17 00:00:00 2001 From: Guillaume Wenzek Date: Tue, 3 Oct 2023 18:26:32 +0200 Subject: [PATCH] nit --- fairseq2n/python/src/fairseq2n/bindings/data/data_pipeline.cc | 3 +-- src/fairseq2/data/data_pipeline.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fairseq2n/python/src/fairseq2n/bindings/data/data_pipeline.cc b/fairseq2n/python/src/fairseq2n/bindings/data/data_pipeline.cc index 6822a419b..07307e5eb 100644 --- a/fairseq2n/python/src/fairseq2n/bindings/data/data_pipeline.cc +++ b/fairseq2n/python/src/fairseq2n/bindings/data/data_pipeline.cc @@ -420,9 +420,8 @@ def_data_pipeline(py::module_ &data_module) opt_overrides = *std::move(maybe_opt_overrides); map_fn f = collater(opts, std::move(opt_overrides)); - element_mapper mapper{f, std::nullopt}; - self = std::move(self).map(std::move(mapper), num_parallel_calls); + self = std::move(self).map(std::move(f), num_parallel_calls); return self; }, diff --git a/src/fairseq2/data/data_pipeline.py b/src/fairseq2/data/data_pipeline.py index 53c27233c..71224e3fc 100644 --- a/src/fairseq2/data/data_pipeline.py +++ b/src/fairseq2/data/data_pipeline.py @@ -163,6 +163,7 @@ def collate( ) -> Self: """Concatenate a list of inputs into a single inputs. + This is equivalent to calling `.map(Collater())`. See :py:class:`fairseq2.data.Collater` for details. """