MCPcopy Create free account
hub / github.com/OpenLMLab/MOSS-RLHF / batch_generator

Method batch_generator

ppo/ppo_datahelper.py:353–359  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

351 return batch
352
353 def batch_generator(self):
354 while True:
355 for batch in super().batch_generator():
356 if len(batch) == self.batch_size:
357 yield batch
358 if self.mode != 'train':
359 break
360

Callers

nothing calls this directly

Calls 1

batch_generatorMethod · 0.45

Tested by

no test coverage detected