Is it okay to return a fitted `scikit-learn` objec...
# prefect-community
j
Is it okay to return a fitted
scikit-learn
object from a task? Any gotchas if I then pass it to a second task which is responsible for calling
.predict()
using that same object. Reason I’m asking: I thought I read somewhere in the prefect docs to be careful with state in such cases, but I can’t seem to find it.
a
It largely depends on your storage - if you use pickle storage, your objects must be serializable with cloudpickle
👍 1
k
I believe all sklearn models are pickle serializable so this should be fine. And it won’t even affect anything except the
result
. If you are passing it downstream, it is perfectly fine
👍 2
j
Awesome, thanks