Spaces:
Runtime error
Runtime error
File size: 427 Bytes
d1b91e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import os
os.environ["OMP_NUM_THREADS"] = "1"
from utils.commons.hparams import hparams, set_hparams
import importlib
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()
|