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

Why does _fit_and_score use print() instead of logging? #6487

Closed
FragLegs opened this issue Mar 4, 2016 · 1 comment
Closed

Why does _fit_and_score use print() instead of logging? #6487

FragLegs opened this issue Mar 4, 2016 · 1 comment

Comments

@FragLegs
Copy link

FragLegs commented Mar 4, 2016

Forgive me if this has been discussed already, but why does sklearn.cross_validation._fit_and_score use a verbosity parameter and the print function, rather than using python's logging module? As someone who is building a library that uses sklearn, it means that I have to expose that verbosity parameter in my code, rather than letting the user set the logging level (or even hide the logging from that module).

For instance in lines 1434-1440 of sklearn/cross_validation.py

    if verbose > 1:
        if parameters is None:
            msg = "no parameters to be set"
        else:
            msg = '%s' % (', '.join('%s=%s' % (k, v)
                          for k, v in parameters.items()))
        print("[CV] %s %s" % (msg, (64 - len(msg)) * '.'))
@amueller
Copy link
Member

amueller commented Oct 7, 2016

duplicate of #78, feel free to comment there.

Answer: no-one implemented it, also it makes it more complicated for the average user.
If you make a good case, a PR might be accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants