From 3de514f039c5b765f217c8438447707918ae7047 Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Tue, 2 Apr 2024 12:34:35 -0500 Subject: [PATCH] Update tinystories.py --- litgpt/data/tinystories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litgpt/data/tinystories.py b/litgpt/data/tinystories.py index dd5cad2809..e95215b412 100644 --- a/litgpt/data/tinystories.py +++ b/litgpt/data/tinystories.py @@ -54,7 +54,7 @@ def prepare_data(self) -> None: assert len(files) > 1, f"Expected at least two json files in {files}" # train/test split. let's use only shard 0 for test split, rest train val_file, *train_files = files - if num_workers is None: + if self.num_workers is None: num_workers = os.cpu_count() - 1 if not Path(self.data_path_train).is_dir():