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

Commit

Permalink
Add ability for Metrics to add metrics from another Metrics object (#…
Browse files Browse the repository at this point in the history
…3145)

* Add notion of metrics collections, which can have other Metrics of multiple metrics be added to it

See #3138 for context and use

* right, having different arguments for the same function aren't a thing in python...

(alas, that's what I get for mostly coding in C++ for the past few years. :P)

* fixed a bug while integrating into taskmaster2

* address comments (get rid of separate class, add func to Metrics directly)

* actually do the things the last comment
  • Loading branch information
moyapchen authored and Moya Chen committed Oct 2, 2020
1 parent 39ae714 commit 5b49610
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions parlai/core/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ def add_metrics(self, other: "Metrics") -> None:
for k, v in other._data.items():
self.add(k, v)


class TeacherMetrics(Metrics):
"""
Helper container which encapsulates standard metrics (F1, BLEU, ...).
Expand Down

0 comments on commit 5b49610

Please sign in to comment.