Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #128 from Ynzl/fix-build-metric
Browse files Browse the repository at this point in the history
fix bug: pass **kwargs when building metric with string
  • Loading branch information
svenpeter42 committed Jul 27, 2018
2 parents ded35ea + 9205855 commit c83f2ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inferno/trainers/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def build_metric(self, method, **kwargs):
elif isinstance(method, str):
assert hasattr(metrics, method), \
"Could not find the metric '{}'.".format(method)
self._metric = getattr(metrics, method)()
self._metric = getattr(metrics, method)(**kwargs)
else:
raise NotImplementedError
return self
Expand Down

0 comments on commit c83f2ec

Please sign in to comment.