You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Importing ForwardHookManager via from torchdistill.core.forward_hook import ForwardHookManager causes logging to file not to work properly.
importloggingfromtorchdistill.core.forward_hookimportForwardHookManagerlogger=logging.getLogger(__name__)
logging.basicConfig(filename='test.log', encoding='utf-8', level=logging.DEBUG)
logging.debug('This message should go to the log file')
logger.debug('This should also go to the log file')
The messages do not go to the log file. Commenting out from torchdistill.core.forward_hook import ForwardHookManager, the messages go to the log file as expected.
To Reproduce
Provide
Exact command to run your code - provided above
Whether or not you made any changes in Python code (if so, how you made the changes?) - Did not make changes
YAML config file - not relevant
Log file - not relevant
Expected behavior
A clear and concise description of what you expected to happen.
The messages should go the log file, global logging behaviour should not change due to the import.
Environment (please complete the following information):
OS: [e.g. Ubuntu 20.04 LTS] macOS Sonoma 14.4.1
Python ver. [e.g. 3.8] 3.11.9
torchdistill ver. [e.g. v0.3.2] 1.1.0
Additional context
Probably related to the logging configuration in torchdistill/common/constant.py
The text was updated successfully, but these errors were encountered:
Describe the bug
Importing
ForwardHookManager
viafrom torchdistill.core.forward_hook import ForwardHookManager
causes logging to file not to work properly.The messages do not go to the log file. Commenting out
from torchdistill.core.forward_hook import ForwardHookManager
, the messages go to the log file as expected.To Reproduce
Provide
Expected behavior
A clear and concise description of what you expected to happen.
The messages should go the log file, global logging behaviour should not change due to the import.
Environment (please complete the following information):
Additional context
Probably related to the logging configuration in
torchdistill/common/constant.py
The text was updated successfully, but these errors were encountered: