예제 #1
0
def _samplers_loader(r: hydra_slayer.Registry):
    from torch.utils.data import sampler as s

    factories = {k: v for k, v in s.__dict__.items() if "Sampler" in k and k != "Sampler"}
    r.add(**factories)
    from catalyst.data import sampler

    r.add_from_module(sampler)
예제 #2
0
def _engines_loader(r: hydra_slayer.Registry):
    from catalyst.core.engine import IEngine

    r.add(IEngine)

    from catalyst import engines as m

    r.add_from_module(m)
예제 #3
0
def _callbacks_loader(r: hydra_slayer.Registry):
    from catalyst.core.callback import Callback, CallbackWrapper

    r.add(Callback)
    r.add(CallbackWrapper)

    from catalyst import callbacks as m

    r.add_from_module(m)
예제 #4
0
def _runners_loader(r: hydra_slayer.Registry):
    from catalyst.core.runner import IRunner

    r.add(IRunner)
    r.add(IRunner)

    from catalyst import runners as m

    r.add_from_module(m)
예제 #5
0
def _dataloaders_loader(r: hydra_slayer.Registry):
    from torch.utils.data import DataLoader

    r.add(DataLoader)