diff --git a/tools/eval.py b/tools/eval.py index 384a497906bc436a9bd20a5d0cb3165dc4af4f3b..40cbbecd8b579c7b967169e632be77c9293715a3 100755 --- a/tools/eval.py +++ b/tools/eval.py @@ -29,7 +29,7 @@ warnings.filterwarnings('ignore') import paddle -from ppdet.core.workspace import load_config, merge_config +from ppdet.core.workspace import create, load_config, merge_config from ppdet.utils.check import check_gpu, check_npu, check_xpu, check_mlu, check_version, check_config from ppdet.utils.cli import ArgsParser, merge_args from ppdet.engine import Trainer, init_parallel_env @@ -130,7 +130,7 @@ def run(FLAGS, cfg): json_eval_results( cfg.metric, json_directory=FLAGS.output_eval, - dataset=cfg['EvalDataset']) + dataset=create('EvalDataset')()) return # init parallel environment if nranks > 1