@@ -174,14 +174,19 @@ def make_tfds_train_iterator(
174174 assert (
175175 config .global_batch_size_to_load % global_mesh .size == 0
176176 ), "Batch size should be divisible by number of global devices."
177+
178+ get_datasets_kwargs = {
179+ "dataset_name" : config .dataset_name ,
180+ "dataset_path" : config .dataset_path ,
181+ "data_split" : config .train_split ,
182+ "shuffle_files" : config .enable_data_shuffling ,
183+ "shuffle_seed" : config .data_shuffle_seed ,
184+ }
177185 if not config .colocated_python_data_input :
178186 train_ds = get_datasets (
179- dataset_name = config .dataset_name ,
180- data_split = config .train_split ,
181- shuffle_files = config .enable_data_shuffling ,
182- shuffle_seed = config .data_shuffle_seed ,
183187 dataloading_host_index = process_indices_train .index (jax .process_index ()),
184188 dataloading_host_count = len (process_indices_train ),
189+ ** get_datasets_kwargs ,
185190 )
186191 train_dataloader = preprocessing_pipeline (
187192 dataset = train_ds ,
@@ -206,11 +211,7 @@ def make_tfds_train_iterator(
206211 else :
207212 get_ds_fn = functools .partial (
208213 get_datasets ,
209- dataset_name = config .dataset_name ,
210- dataset_path = config .dataset_path ,
211- data_split = config .train_split ,
212- shuffle_files = config .enable_data_shuffling ,
213- shuffle_seed = config .data_shuffle_seed ,
214+ ** get_datasets_kwargs ,
214215 )
215216 preprocessing_fn = functools .partial (
216217 preprocessing_pipeline ,
0 commit comments