MCPcopy Create free account
hub / github.com/apple/ml-pointersect / __str__

Method __str__

cdslib/core/data/dataloader/batch_preparer.py:226–239  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

224 return math.ceil(total_samples / self.batch_size) # this is an estimation (due to max_combined_batch_size)
225
226 def __str__(self):
227 return (
228 f"Num datasets: {len(self.datasets)}\n"
229 f"Total samples (without ratio): {self.get_total_samples(multiplied_with_ratio=False)}\n"
230 f"Total samples (with ratio): {self.get_total_samples(multiplied_with_ratio=True)}\n"
231 f'Individual size: {" ".join([str(len(dset)) for dset in self.datasets])}\n'
232 f'Individual ratio: {" ".join([str(r) for r in self.dataset_ratios])}\n'
233 f"Max total samples per epoch: {self.max_total_samples_per_epoch}\n"
234 f"Batch size: {self.batch_size}\n"
235 f"Num batches: {len(self)}\n"
236 f"Shuffle: {self.shuffle}\n"
237 f"Drop last: {self.drop_last}\n"
238 f"Batch wrt length: {self.batch_wrt_length}"
239 )
240
241 def __iter__(self):
242 """

Callers

nothing calls this directly

Calls 1

get_total_samplesMethod · 0.95

Tested by

no test coverage detected