From e2dcab6f0e09f43b2053f77e52111381250f948d Mon Sep 17 00:00:00 2001 From: Naji El Hachem Date: Thu, 5 Oct 2023 15:43:20 +0200 Subject: [PATCH] resolve last nit comment --- .../src/fairseq2n/data/composite_data_source.cc | 4 ++-- src/fairseq2/data/data_pipeline.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fairseq2n/src/fairseq2n/data/composite_data_source.cc b/fairseq2n/src/fairseq2n/data/composite_data_source.cc index 801db4814..34cd1c0d3 100644 --- a/fairseq2n/src/fairseq2n/data/composite_data_source.cc +++ b/fairseq2n/src/fairseq2n/data/composite_data_source.cc @@ -13,8 +13,8 @@ composite_data_source::composite_data_source( index_generator_fn &&index_gen_fn, bool stop_at_shortest) : pipelines_(std::move(pipelines)), - next_index_gen_(std::move(index_gen_fn)), - stop_at_shortest_(stop_at_shortest) + next_index_gen_{std::move(index_gen_fn)}, + stop_at_shortest_{stop_at_shortest} { if (!stop_at_shortest) { is_epoch_done_ = std::vector(pipelines_.size(), false); diff --git a/src/fairseq2/data/data_pipeline.py b/src/fairseq2/data/data_pipeline.py index 22780178a..063e3b676 100644 --- a/src/fairseq2/data/data_pipeline.py +++ b/src/fairseq2/data/data_pipeline.py @@ -103,9 +103,9 @@ def round_robin( :param pipelines: The data pipelines to round robin. :param stop_at_shortest: - Flag to stop round_robin when first pipeline reaches its end. - If set to False, we circle around finished pipelines until all - data pipelines reach their end. + If ``True``, stop round_robin when first pipeline reaches its end. + If ``False``, circle around finished pipelines until all pipelines + reach their end. """ @staticmethod @@ -121,9 +121,9 @@ def sample( :param weights: Desired distribution of pipelines. If None, use uniform distribution. :param stop_at_shortest: - Flag to stop sampling when first pipeline reaches its end. - If set to False, we circle around finished pipelines until all - data pipelines reach their end. + If ``True``, stop sampling when first pipeline reaches its end. + If ``False``, circle around finished pipelines until all pipelines + reach their end. """ @staticmethod