pytorch/ignite

`Timer`'s misleading behaviour when epoch completion time calculated

Open

#2 157 ouverte le 11 août 2021

Voir sur GitHub
 (7 commentaires) (1 réaction) (1 assigné)Python (602 forks)batch import
HacktoberfestPyDataGlobalenhancementhelp wanted

Métriques du dépôt

Stars
 (4 313 stars)
Métriques de merge PR
 (Merge moyen 18j 23h) (19 PRs mergées en 30 j)

Description

When I tried calculating the time taken to complete a single epoch via Timer, the handlers attached to trainer before Timer were executed first, and thus their time also got recorded by the Timer too for a single epoch. Therefore the true time taken for epoch completion, provided by trainer.state.times, is less than what Timer calculated. This can be misleading. More clarification on how this actually works in the docs would be appreciated. Or the Timer's functionality can be enhanced to step before all other handlers attached to an event could also be helpful. Notebook to quickly verify this here.

Guide contributeur