Spaces:
Configuration error
Configuration error
File size: 313 Bytes
1ba539f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import imp
import os
def _evaluator_factory(cfg):
module = cfg.evaluator_module
path = cfg.evaluator_path
evaluator = imp.load_source(module, path).Evaluator()
return evaluator
def make_evaluator(cfg):
if cfg.skip_eval:
return None
else:
return _evaluator_factory(cfg)
|