Datasets:

ArXiv:
data / utils.py
Elron's picture
Upload utils.py with huggingface_hub
b548ba5
raw
history blame
246 Bytes
import abc
class Singleton(abc.ABC):
_instances = {}
def __new__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__new__(cls)
return cls._instances[cls]