From 82484105265bcc06bf996a1a336e8ade28fd9fa3 Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Sat, 6 Jul 2024 16:53:35 +0545 Subject: [PATCH] feat: adds default missing return case --- src/litdata/utilities/dataset_utilities.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/litdata/utilities/dataset_utilities.py b/src/litdata/utilities/dataset_utilities.py index 0105c0a0..139a3b1b 100644 --- a/src/litdata/utilities/dataset_utilities.py +++ b/src/litdata/utilities/dataset_utilities.py @@ -126,6 +126,7 @@ def load_index_file(input_dir: str) -> Dict[str, Any]: data = json.load(f) if "chunks" not in data: raise KeyError(f"'chunks' not found in the index file at {index_filepath}.") + return data except KeyError as e: # Verify the presence of MDS shards # For more details, refer to the MosaicML Streaming documentation: https://github.com/mosaicml/streaming