mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-03 20:59:49 +00:00
15 lines
228 B
Python
15 lines
228 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class DummyDataGenerator(ABC):
|
|
|
|
@abstractmethod
|
|
def generate(self):
|
|
pass
|
|
|
|
def __iter__(self):
|
|
return self
|
|
|
|
def __next__(self):
|
|
return self.generate()
|