Skip to content

Commit

Permalink
Add kwargs to exact string match (#4479)
Browse files Browse the repository at this point in the history
Signed-off-by: MaximumEntropy <[email protected]>
  • Loading branch information
MaximumEntropy authored Jun 30, 2022
1 parent 7e53b32 commit a8f5f63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nemo/collections/common/metrics/classification_accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def compute_topk_accuracy(correct_counts_k, total_counts_k):


class ExactStringPerCategoryMatchMetric(Metric):
def __init__(self, categories=[], dist_sync_on_step=False):
def __init__(self, categories=[], dist_sync_on_step=False, **kwargs):
super().__init__(dist_sync_on_step=dist_sync_on_step)
self.categories = set(categories)

Expand Down Expand Up @@ -190,7 +190,7 @@ def compute(self):


class ExactStringMatchMetric(Metric):
def __init__(self, dist_sync_on_step=False):
def __init__(self, dist_sync_on_step=False, **kwargs):
super().__init__(dist_sync_on_step=dist_sync_on_step)

self.add_state("correct", default=torch.tensor(0), dist_reduce_fx="sum")
Expand Down

0 comments on commit a8f5f63

Please sign in to comment.