-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[STALLED] Optional verbosity for Pipeline #5321
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
Conversation
Apart from the use of closures breaking pickling, modifying an estimator because of the context it's used in could be pretty nasty to the user... You'll need to rethink the design. |
I wanted to avoid putting timing code in each method, and I wanted Breaking pickling seems unacceptable though. I can make a helper function that takes the fit/transform method as an argument and prints timing info (ugly, unfortunately), or just write timers into each method. What do you prefer? |
f54daaa
to
4e88f3d
Compare
I suspect that usually we want timing information for all fit calls, and On 27 September 2015 at 08:26, Sam Zhang [email protected] wrote:
|
63fc8a8
to
70bd7d9
Compare
I've taken those suggestions into account and left prediction-time calls untimed for now. |
sklearn/pipeline.py
Outdated
if self.verbose: | ||
elapsed = time.time() - start_time | ||
time_str = logger.short_format_time(elapsed) | ||
print('[Pipeline] %s ... %s' % (name, time_str)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's be a bit more informative and say (step 1 of 10)
for instance.
LGTM! Please make that little tweak to informativeness, and add an entry to |
LGTM apart from @jnothman's comments |
1a8fa35
to
404ee4c
Compare
could you please rebase? |
Adds named verbosity argument in Pipeline constructor. After each step, verbose pipelines print to standard output lines like: > [Pipeline] <step name>, <action> (fit or transform), <duration>
404ee4c
to
a42026c
Compare
hm didn't work :-/ |
@samzhang111 Thanks for picking this up! I was looking for exactly this functionality. If you're still interested in getting this merged, I'd love to be an early user :) |
I was almost ready to merge at #7163 when I decided to check the output. Cross-validation's def _log_time(left_text, right_text, time, width=70, file=sys.stdout):
pass would be appropriate. @samzhang111, are you still around and interested in working on this? |
@samzhang111 I guess that's a "no"? |
Sorry, I have been on vacation. If someone would like to do it quickly, On Fri, Aug 26, 2016 at 1:07 PM, Andreas Mueller [email protected]
|
@samzhang111, I'm going to open this to another contributor to complete. Let me know if you're pushing on with it. |
Close in favor of #10435 just to avoid clutter? |
Adds named verbosity argument in Pipeline constructor.
After each step, verbose pipelines print to standard output lines like:
[Pipeline] <step name>, <action> (fit or transform), <duration>
#5298