-
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
Enhance bundle logging logic #7513
Comments
Hi, @KumoLiu
Thanks. |
Modify the function _log_input_summary() at 2024/05/27 Signed-off-by: Ted.Lai <hyacinth97223>
Modify the function _log_input_summary() at 2024/05/27 Signed-off-by: Ted.Lai <[email protected]>
Modify the function _log_input_summary() at 2024/05/27 Signed-off-by: Ted.Lai <[email protected]>
Fixes Project-MONAI#7513 Signed-off-by: Ted.Lai <[email protected]>
Hi @hyacinth97223, thanks for your interest here.
For this one, I mean users can directly log the arguments to a local file using
For multi-gpu, there will be a lot of duplicate code that is not very well understood. Such as:
|
Hi, @KumoLiu I modified the _log_input_summary() function to include the following enhancements: Single GPU (rank 0 only): If there is only one GPU, the function will exclusively output all arguments of rank 0 and create a log file to record these arguments. I wrote a multi-threaded program to test the functionality of this function, and the output is as shown in the image below. The generated log files are as shown in the image below. I would greatly appreciate your feedback on whether this implementation meets your expectations and requirements. Please let me know if you have any further questions or modifications. |
Hi @hyacinth97223, thanks for your interest here again! Line 179 in 7a8680e
BTW, I didn't see where you push the code? |
Signed-off-by: YunLiu <[email protected]>
… the bundle (#8142) Fix Project-MONAI/model-zoo#658, part of #7513 ### Description Enable redirection of all loggers by configuring a FileHandler within the bundle ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: YunLiu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
There are issues with using logging.conf to document the arguments recorded by _log_input_summary. Additionally, when more than one GPU is utilized, the output becomes messy and unmanageable.
https://github.com/Project-MONAI/model-zoo/blob/dev/models/brats_mri_generative_diffusion/configs/logging.conf
MONAI/monai/bundle/scripts.py
Line 118 in 02c7f53
The text was updated successfully, but these errors were encountered: