-
-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make metrics serializable #3001
Changes from all commits
abc6a8c
99a45c6
d8cf875
7991411
ef92ef9
452a950
3aea2e5
81ede5b
18549aa
13a7613
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,9 @@ def log_running_avg_metrics(): | |
""" | ||
|
||
required_output_keys = None | ||
# TODO Shall we put `src` here? Then we should add a new branch for metric-typed attributes in `state_dict` | ||
# and `load_state_dict`. Examples; This class; `Rouge` which has a `List[_BaseRouge]`. | ||
_state_dict_all_req_keys = ("_value",) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vfdev-5 , What's your thoughts on this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add |
||
|
||
def __init__( | ||
self, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we would like to get that in a more automatic way. Also if we want to save multiple metrics adding them one by one to save/load can be a pain.
Let's propose something in a follow-up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please reiterate what you mean? If we have multiple metrics, is it cumbersome to do:
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is too verbose, let's try to find a way to simplify that.