M4Singer / tasks /run.py
kevinwang676's picture
Duplicate from zlc99/M4Singer
26925fd
raw
history blame
371 Bytes
import importlib
from utils.hparams import set_hparams, hparams
def run_task():
assert hparams['task_cls'] != ''
pkg = ".".join(hparams["task_cls"].split(".")[:-1])
cls_name = hparams["task_cls"].split(".")[-1]
task_cls = getattr(importlib.import_module(pkg), cls_name)
task_cls.start()
if __name__ == '__main__':
set_hparams()
run_task()