-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update statshandler logging message #6051
Conversation
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
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.
OK, I think the change is acceptable now. But please verify it with some bundles and workflow tutorials before merging.
Thanks.
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
thanks, I've tested it in a bundle and tutorials, after merging this PR this global setting can be avoided: logging.basicConfig(stream=sys.stdout, level=logging.INFO) new usage would be, either specify a logger name when creating monai.handlers.StatsHandler(name="train_stats"...) or update the engine logger using trainer = ignite.engine.Engine(lambda x, y: [0.0])
ignite.utils.setup_logger(trainer.logger.name, reset=True)
monai.handlers.StatsHandler().attach(trainer)
trainer.run(range(3), max_epochs=4) |
/build |
Signed-off-by: Wenqi Li <[email protected]>
/build |
Hi @wyli , I think your examples are python level, could you please share some usage examples for the bundle config? Thanks in advance. |
### Description - Project-MONAI/MONAI#6034 - Project-MONAI/MONAI#6051 ### Checks <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Avoid including large-size files in the PR. - [x] Clean up long text outputs from code cells in the notebook. - [x] For security purposes, please check the contents and remove any sensitive info such as user names and private key. - [x] Ensure (1) hyperlinks and markdown anchors are working (2) use relative paths for tutorial repo files (3) put figure and graphs in the `./figure` folder - [x] Notebook runs automatically `./runner.sh -t <path to .ipynb file>` --------- Signed-off-by: Wenqi Li <[email protected]>
### Description - Project-MONAI/MONAI#6034 - Project-MONAI/MONAI#6051 ### Checks <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Avoid including large-size files in the PR. - [x] Clean up long text outputs from code cells in the notebook. - [x] For security purposes, please check the contents and remove any sensitive info such as user names and private key. - [x] Ensure (1) hyperlinks and markdown anchors are working (2) use relative paths for tutorial repo files (3) put figure and graphs in the `./figure` folder - [x] Notebook runs automatically `./runner.sh -t <path to .ipynb file>` --------- Signed-off-by: Wenqi Li <[email protected]>
Description
The recommendation in
StatsHandler
of setting the global logging config may not work in some cases (e.g. google colab and #5960) https://docs.python.org/3/library/logging.html#logging.basicConfigMONAI/monai/handlers/stats_handler.py
Line 55 in 3eef61e
in general we shouldn't recommend changing the root logger directly.
This PR changes the message to tune the module level loggers, updated example message will be:
the updated commands are tested in the colab example:
https://colab.research.google.com/drive/1boqy7ENpKrqaJoxFlbHIBnIODAs1Ih1T
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.