Skip to content

Commit 5bbc1f4

Browse files
committed
chore: mr comment (#31)
1 parent ca9834f commit 5bbc1f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/atomworks/ml/datasets/datasets.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,11 @@ def __init__(
281281
self.file_paths = file_paths
282282

283283
# Create ID mapping
284-
self.id_to_idx_map = {self._get_example_id(i): i for i, _ in enumerate(file_paths)}
284+
self.id_to_idx_map = {self._get_example_id(i): i for i, _ in enumerate(self.file_paths)}
285+
286+
# Verify that all example IDs are unique
287+
if len(self.id_to_idx_map) != len(self.file_paths):
288+
raise ValueError("Example IDs must be unique. Found duplicate example IDs.")
285289

286290
@classmethod
287291
def from_directory(

0 commit comments

Comments
 (0)