MCPcopy Create free account
hub / github.com/Open-Bee/DataStudio / __len__

Method __len__

datastudio/datasets/data_loader.py:364–366  ·  view source on GitHub ↗

Return the number of batches.

(self)

Source from the content-addressed store, hash-verified

362 return self.name
363
364 def __len__(self) -> int:
365 """Return the number of batches."""
366 return (len(self.datas) + self.real_batch_size - 1) // self.real_batch_size
367
368 def __iter__(self) -> Iterator[List[Dict]]:
369 """Initialize iteration."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected