Conversation
| @jeffra, how do we handle these 2: may be should ask @RezaYazdaniAminabadi since the first one is cpp, the 2nd one I can't find where is it coming from. |
| They both seem to be coming from here, The first is printed via I think we can transfer the current logging state via this method that's exposed to python side: https://github.com/microsoft/DeepSpeed/blob/bc019a533971e1dcfde93972ae892b1a4f425041/csrc/adam/cpu_adam.cpp#L319-L325 Here's where it's called on python side: https://github.com/microsoft/DeepSpeed/blob/c79184ebcc501ad64a8628afe18c0659d1bc4963/deepspeed/ops/adam/cpu_adam.py#L80-L86 |
| Ah, I was looking under OK, so let's make the cpp side log for where the current log level we get from: Could perhaps add a wrapper for |
Yep, this looks good to me. |
| Added:
now if the |
| @jeffra, this PR appears to be complete. |
| @RezaYazdaniAminabadi, I have just noticed pytorch has a cpp setup that interfaces python logging system, e.g.: Perhaps deepspeed could adopt the same mechanics, and then clean logging in cpp extensions will be a breeze. |
This PR attempts to clean up uncontrollable by user debug prints, it:
When running with log level ERROR, it's now almost clean.
The only 2 logs I couldn't figure out is:
One comes from cpp, no idea how to tell a cpp file to respect a log level.
The other one I couldn't find - any idea where it comes from? It looks like some kind created on the fly print.