automl / HPOBench

Collection of hyperparameter optimization benchmark problems
Apache License 2.0
139 stars 36 forks source link

HPOBench containers set root logger level when importing #176

Closed Game4Move78 closed 1 year ago

Game4Move78 commented 1 year ago

https://github.com/automl/HPOBench/blob/d8b45b1eca9a61c63fe79cdfbe509f77d3f5c779/hpobench/container/client_abstract_benchmark.py#L45

If a program sets all loggers to a particular log level and then imports a HPOBench container later in the program (i.e. at the function level to make the dependency on hpobench optional), it will override their chosen log settings. This is because the root logger is set by HPOBench. Shouldn't it be:

root = logging.getLogger("hpobench")
root.setLevel(level=LOG_LEVEL)
Neeratyoy commented 1 year ago

Thanks for pointing this out. Have addressed them here on the master branch directly.

This should not break anything or affect your usage I believe. Please feel free to close the issue if this resolved it.