Stats Handler not printing iter/loss values #3769
Unanswered
skrishnanv
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi @skrishnanv , Thanks for your interest here. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a weird problem. I first ran the code here with modification for data loaders. The output was as expected with printings on console. For example,
<Logger ignite.engine.engine.Engine (INFO)> # print(trainer.logger)
INFO:ignite.engine.engine.Engine:Engine run starting with max_epochs=4.
INFO:trainer:Epoch: 1/4, Iter: 1/20 -- Loss: 0.6601
INFO:trainer:Epoch: 1/4, Iter: 2/20 -- Loss: 0.6941
Next i modified this code to make some classes around it to add things like loss, optimiser, trainer event handlers etc. After this modification, the console printed nothing.
However this time, the logger level changed; i have no clue why.
<Logger ignite.engine.engine.Engine (WARNING)>
Despite this newer level of logging, I added ignite events and was able to print. Even changing the debug levels did not help.
print(self.trainer._event_handlers)
gives below.defaultdict(<class 'list'>, {<Events.ITERATION_COMPLETED: 'iteration_completed'>: [(<bound method StatsHandler.iteration_completed of <monai.handlers.stats_handler.StatsHandler object at 0x000001C2C164B220>>, (<ignite.engine.engine.Engine object at 0x000001C2C164B040>,), {})], <Events.EPOCH_COMPLETED: 'epoch_completed'>: [(<bound method StatsHandler.epoch_completed of <monai.handlers.stats_handler.StatsHandler object at 0x000001C2C164B220>>, (<ignite.engine.engine.Engine object at 0x000001C2C164B040>,), {})], <Events.EXCEPTION_RAISED: 'exception_raised'>: [(<bound method StatsHandler.exception_raised of <monai.handlers.stats_handler.StatsHandler object at 0x000001C2C164B220>>, (<ignite.engine.engine.Engine object at 0x000001C2C164B040>,), {})]})
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions