Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mljar should not configure logging level #690

Open
haim-cohen-moonactive opened this issue Jan 8, 2024 · 3 comments
Open

mljar should not configure logging level #690

haim-cohen-moonactive opened this issue Jan 8, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@haim-cohen-moonactive
Copy link

haim-cohen-moonactive commented Jan 8, 2024

Hi Piotr,
First, I wanted to let you know you are doing a great job!

We are trying to use mljar-supervised as a library in a large application. However, when trying to get log messages we see that your code set the default log level to ERROR. For example, at exceptions.py and automl.py. Calling basicConfig the second time does not affect the default logger and subsequent loggers. This makes it hard to use mljar as a library. We must make sure we call basicConfig first and then import AutoML... It feels like a race :-)

When running a library as part of an application, libraries should let the logging level, only use logger (e.g. logger = logging.getLogger(__name__)). Let the running application set the desired logging level. Libraries should set logging levels only on unit tests or CLI's.

In addition, mljar print messages about its current status using print command and not logging. This makes it hard to follow when running the application in a logging managed environment (like cloud providers). Can you please make the change? As those print messages comes mostly from verbose_print method, it looks like it is a single place to replace.

Thanks!
Haim

@pplonski
Copy link
Contributor

pplonski commented Jan 8, 2024

Hi @haim-cohen-moonactive,

Thanks! Do you get good models with our AutoML?

For sure logging can be improved as you described, but it is hard to say when it will be done. PR are welcome!

@pplonski pplonski added enhancement New feature or request help wanted Extra attention is needed labels Jan 8, 2024
@haim-cohen-moonactive
Copy link
Author

@pplonski I tried to push a branch to open PR but I got permission denied. What do I/you need to do to have me as a contributor?
Thx!

@pplonski
Copy link
Contributor

Hi @haim-cohen-moonactive,

Please try to make a fork first. Then you commit changes to your fork. When you are ready, you can click Pull Request on your forked repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants