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

Undefined variable in metrics.py #3622

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parlai/core/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ def _consume_user_metrics(self, observation):
if uk in ALL_METRICS:
# don't let the user override our metrics
uk = f'USER_{uk}'
assert isinstance(uk, str), type(k)
assert isinstance(uk, str), f'{type(uk)} is not a str'
if not isinstance(v, Metric):
warn_once(f'Metric {uk} is assumed to be averaged per example.')
v = AverageMetric(v)
Expand Down