directly set pytorch metric when it's empty for regression_test.py (#1704)

This commit is contained in:
AllentDan 2023-02-03 11:25:11 +08:00 committed by GitHub
parent 23eed5c265
commit 7d085bee0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -316,7 +316,7 @@ def get_pytorch_result(model_name: str, meta_info: dict, checkpoint_path: Path,
pytorch_metric.update(_metrics[ds])
if ds == dataset:
pytorch_metric.update(_metrics)
else:
if pytorch_metric == dict():
pytorch_metric.update(_metrics)
task_name = metafile_metric['Task']
if task_name not in using_task: