2013/3/15 Conrad Lee <conrad...@gmail.com>:
> The server will handle requests in parallel.  Most requests will include a
> feature vector, and for these I will return a prediction by calling the
> 'predict' or 'predict_proba' method on the classifier.  If the server has
> several threads running concurrently, can they all simultaneously make calls
> to the classifier's predict method without causing problems?

That should be no problem. In recent versions, predict is just a few
NumPy operations.

> What if one of these threads calls the fit() method, while others are still
> calling predict?  I suspect that will cause problems...

That's undefined behavior. We don't atomically set the intercept_ and
coef_, and I don't think we should try to do that. If memory permits,
just fit a new model and atomically replace your old one.

-- 
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to