MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / __iter__

Method __iter__

datasets/build.py:72–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 self.key_dataset = key_dataset
71
72 def __iter__(self):
73 for batch in zip(*[getattr(self, name) for name in self.dataset_names]):
74 yield {key: batch[i] for i, key in enumerate(self.dataset_names)}
75
76 def __len__(self):
77 return len(getattr(self, self.key_dataset))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected