Skip to content

auto-sklearn modifies logging.basicConfig #491

@koreyou

Description

@koreyou

It seems that autosklearn uses logging.basicConfig internally, which may overwrite library users' logging setting in undesired way.
(it took me some time to figure out what was suddenly breaking my logging setting)
Shouldn't it change the setting of local logger instead of changing the global setting?

Code to reproduce:

import logging
import autosklearn.classification

logging.basicConfig(level=logging.INFO)
# it will output "<Logger test (WARNING)>"
print(logging.getLogger("test"))

In the mean time, there is a easy workaround:

import logging
logging.basicConfig(level=logging.INFO)
import autosklearn.classification

# it will output "<Logger test (INFO)>"
print(logging.getLogger("test"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions