0

I'm developing a distributed application using IPython parallel. There are several tasks which are carried out one after another on the IPython cluster engines. One of these tasks inevitably makes use of closures. Hence, I have to tell IPython to use Dill instead of Pickle by calling dv.use_dill(). Though this should be temporarily.

Is there any way to activate Pickle again once Dill is enabled? I couldn't find any function (something of the form dv.use_pickle()) which would make such an option explicit.

t3c
  • 3
  • 4

1 Answers1

1

I'm the dill author. I don't know if IPython does anything unusual, but you can revert to pickle if you like through dill directly with dill.extend(False)… although this is a relatively new feature (not yet in a stable release).

If IPython doesn't have a dv.use_pickle() (it doesn't at the moment), it should… and could just use the above to do it.

Mike McKerns
  • 33,715
  • 8
  • 119
  • 139
  • I'm confused I get a message saying `AttributeError: 'module' object has no attribute 'extend'` I typed `dill.extend(False)` – evan54 Dec 21 '14 at 19:52
  • It's a more recent feature of `dill` (as noted, it's not in a stable release). Do you have an older version? A new release is imminent (as of this writing), but until then, if you want `dill.extend`, then you'd need to grab the bleeding edge version off github. – Mike McKerns Dec 21 '14 at 21:12
  • 1
    I had the same problem. However, it's in the latest release of `dill`. –  Jan 30 '15 at 19:29
  • It's in the stable releases. – Mike McKerns Jun 11 '16 at 06:18