2011/9/20 Robert Kern <[email protected]>: > 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. :-)
Ok you convinced me. I modified the script to put everything under a if __name__ == '__main__' block with a comment explaining why: https://github.com/scikit-learn/scikit-learn-tutorial/blob/master/solutions/exercise_02_sentiment.py Meng, can you please check that it solves your problem? -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ 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
