pytorch/ignite

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

開放

#2,157 建立於 2021年8月11日

 (7 則留言) (1 個反應) (1 位負責人)Python (602 個分叉)batch import
HacktoberfestPyDataGlobalenhancementhelp wanted

倉庫指標

星標
 (4,313 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南