On Tue, Sep 20, 2011 at 02:49, Olivier Grisel <[email protected]> wrote: > 2011/9/20 Robert Kern <[email protected]>:
>> The fix is straightforward on sklearn's part: move the code into a >> function and call that function under an "if __name__ == '__main__':" >> test. Or just move everything under that __main__ test. > > Indeed I keep forgetting about this. That's a pity though: this script > is just an exercise script in a tutorial, it was meant to be a short > and readable sequence of operations executed once for teaching > purpose, not a real packaged program... Look at it this way: this is an opportunity to teach people how to properly structure their scripts for properly for use with joblib on all platforms. :-) > I wonder if we should just remove the `n_jobs` argument to run the > grid search sequentially in that case. But then people will just copy the file and modify it to set n_jobs to be greater, and then ask here why it doesn't work on Windows. It's a teaching moment. Embrace it! -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
