Skip to content

Commit 38bff2d

Browse files
committed
fix
1 parent 08c0a56 commit 38bff2d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/maxtext/configs/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3499,6 +3499,8 @@ def calculate_global_batch_sizes(per_device_batch_size, expansion_factor, num_de
34993499
self.hf_eval_split = "train"
35003500
if self.eval_interval > 0 and not self.hf_eval_split:
35013501
raise ValueError("Please specify hf_eval_split or set eval_interval to <=0.")
3502+
if self.grain_worker_count > 1:
3503+
raise ValueError("grain_worker_count must be <= 1 when dataset_type=hf to prevent OOM")
35023504
elif self.dataset_type == DatasetType.GRAIN:
35033505
if not self.grain_train_files and not self.grain_train_mixture_config_path:
35043506
raise ValueError("When dataset_type=grain, please set grain_train_files or grain_train_mixture_config_path")

0 commit comments

Comments
 (0)