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
In other libraries this is enough to have all the logging be propagated to the root and then since I've added the handler, push them to a file. But with ax the log file is empty. I can see all the ax logger names:
Hi @ksanjeevan! Thanks for bringing this to our attention. We have a few ideas of what the problem might be, but we will need to look into this further to get you a reliable solution. Thanks for your patience while we work on getting you an answer here!
Quick update @ksanjeevan: We refactored the core logger libraries in 44fdecb such that all Ax loggers inherit (and propagate) to the root logger "ax". With those change, this (similar to your example) should work:
# Same as logging.getLogger('ax')
from ax.utils.common.logger import get_root_logger()
fh = logging.FileHandler('out.log')
fh.setLevel(logging.INFO)
get_root_logger().addHandler(fh)
This is currently on master and should get included in the next release.
I'm trying to run trials remotely and log the
ax
output to a file. From my main script I have:In other libraries this is enough to have all the logging be propagated to the root and then since I've added the handler, push them to a file. But with
ax
the log file is empty. I can see all theax
logger names:But adding a handler only works if I set it for each one individually, not just for the
.getLogger('ax')
root.Looking at the code:
Ax/ax/utils/common/logger.py
Line 14 in 4cea49b
What are the best practices to follow if I want all of
ax
logging to be dumped to a file?Thanks.
The text was updated successfully, but these errors were encountered: