Should Params be pickle-able and copy-able (or serializable in general)?

I would propose that all primitives are pickable (and copyable) in some form.

One can implement some or all of the following methods to do so:

  • __getnewargs__
  • __getstate__
  • __setstate__
  • __copy__
  • __deepcopy__

Or use the copyreg module to define functions used while pickling your primitives.

I think it would be great if this would be possible because then we can pickle models, pause and store to disk whole pipelines and things like that.

Currently this can be achieved if hyper-parameter arguments are pickle-able, and if Params are pickle-able. But there is no requirement for this. We should probably require that.

But if Params and arguments are pickle-able, then it is also easy for the primitive itself to be pickle-able. That could even be a default implementation (calling getParams and setParams).

Edited by D3M bot