When fitting multiple outputs with a patsy mean function, an exception is thrown as patsy design matrices do not support pickling. One simple fix would be to convert to a numpy array -- the design matrices aren't really exposed to the user so I don't think it's an issue to store as an array. (Update: If we store just the design matrix array and you need any patsy-specific features, you can pass an existing array to the design matrix __init__ method and it will add any additional attributes that are needed. Thus, I think this is the correct solution.)
Related, current implementation supports passing a ModelDesc object as the mean argument to a GP, which does not allow pickling either. I think most users will simply provide a string for the mean argument, so this should not be a huge issue (though providing some kind of warning or fallback to serial prediction might be nice.
When fitting multiple outputs with a
patsy
mean function, an exception is thrown aspatsy
design matrices do not support pickling. One simple fix would be to convert to a numpy array -- the design matrices aren't really exposed to the user so I don't think it's an issue to store as an array. (Update: If we store just the design matrix array and you need any patsy-specific features, you can pass an existing array to the design matrix__init__
method and it will add any additional attributes that are needed. Thus, I think this is the correct solution.)Related, current implementation supports passing a
ModelDesc
object as themean
argument to a GP, which does not allow pickling either. I think most users will simply provide a string for themean
argument, so this should not be a huge issue (though providing some kind of warning or fallback to serial prediction might be nice.