microsoft / FLAML

A fast library for AutoML and tuning. Join our Discord: https://discord.gg/Cppx2vSPVP.
https://microsoft.github.io/FLAML/
MIT License
3.91k stars 508 forks source link

Verbose argument in model.fit() #38

Closed irahulroy closed 3 years ago

irahulroy commented 3 years ago

Hi,

While training the learner, a console output is generated, which can take up huge space in the notebook if the time_budget is made large. If I wish to suppress the console output while training my learner, how do I do that? In keras, sklearn, etc., setting verbose = 0 suppresses the console output.

Thanks!

sonichi commented 3 years ago

Thanks for the question. The easiest way to do it in your notebook now is to insert these two lines before automl.fit():

from flaml import logger logger.setLevel(logging.WARNING)

for example: from flaml import logger logger.setLevel(logging.WARNING) automl.fit(X_train = X_train, y_train = y_train, **settings)

I'd also encourage a pull request to add an argument verbose in automl.fit(). Feel free to do it if you'd like to contribute.

irahulroy commented 3 years ago

Thanks for the response. However, I get an error 'logging is not defined'.

sonichi commented 3 years ago

@rroy09 Please also add import logging.

irahulroy commented 3 years ago

Thanks a lot for the response.