[Fix] Fix potential unexcepted behaviors if `metric_options` is not specified in multi-label evaluation. (#647)

* Update multi_label.py

* Fix lint

Co-authored-by: mzr1996 <mzr1996@163.com>
pull/679/head
xiatao 2022-01-27 10:27:38 +08:00 committed by GitHub
parent 94eb3ff83e
commit 8488a784f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ class MultiLabelDataset(BaseDataset):
Returns:
dict: evaluation results
"""
if metric_options is None:
if metric_options is None or metric_options == {}:
metric_options = {'thr': 0.5}
if deprecated_kwargs != {}: