-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix to include day count in training duration for metrics.json #2718
Conversation
Sync with allennlp master
Pull from AllenNLP Master
Pull from allennlp master
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.
technically this isn't quite right either, since it does the wrong thing if your training takes more than 31 days (which is unlikely, but still, might as well fix it for good).
I suspect that strftime
isn't the right general solution for this (or at least you'll have to extract the number of days manually)
`time.strftime` does not account for number of days more than 31. Changing it to `datetime.timedelta` and using its `str` representation for printing epoch duration as well as training duration.
Thanks for the nudge. Yes, |
thanks |
…ai#2718) * Added default predictor for bimpm model * Fix allenai#2717: Add day count in training duration This fixes Issue [@2717](allenai#2717) to include day count in `training_duration` key in metrics. * Modify elapsed time format to use `timedelta` `time.strftime` does not account for number of days more than 31. Changing it to `datetime.timedelta` and using its `str` representation for printing epoch duration as well as training duration.
…ai#2718) * Added default predictor for bimpm model * Fix allenai#2717: Add day count in training duration This fixes Issue [@2717](allenai#2717) to include day count in `training_duration` key in metrics. * Modify elapsed time format to use `timedelta` `time.strftime` does not account for number of days more than 31. Changing it to `datetime.timedelta` and using its `str` representation for printing epoch duration as well as training duration.
This is a tiny fix to have day count to be included in
training_duration
in the metrics json. #2717