pytorch/ignite

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

Aperta

#2157 aperta il 11 ago 2021

 (7 commenti) (1 reazione) (1 assegnatario)Python (602 fork)batch import
HacktoberfestPyDataGlobalenhancementhelp wanted

Metriche repository

Star
 (4313 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor