pickle error

Dear community,

so I'm running the minimize_nested_blockmodel_dl() on a high performance
computing cluster (due to RAM limitations on my laptop). My idea was save
the output object via pickle, transfer it to my laptop and to analyse it
there. But I get an error unpickling the object... see below. Would anybody
know if this can be fixed?

Many thanks,

(Both terminals are running Python 2.7.12.)
*(remote) Pickling: *
c = gt.is_bipartite(g, True)[1]
state = gt.minimize_nested_blockmodel_dl(g, deg_corr=True, layers=True,
            state_args=dict(ec=g.ep.visits, layers=False, pclabel=c),
            B_min=200, B_max=2500, verbose=True)
pickle.dump(state, open(outfile, "wb"), -1)

*(local) Unpickling:*
state = pickle.load(open(filename, "rb"))

                                 Traceback (most recent call
last)<ipython-input-2-0c2db42e78d1> in <module>()----> 1 state =
pickle.load(open(filename, "rb")) 2 state.print_summary()
in load(file) 1382 1383 def load(file):-> 1384 return
Unpickler(file).load() 1385 1386 def loads(str):
in load(self) 862 while 1: 863 key =
read(1)--> 864 dispatch[key](self) 865
except _Stop, stopinst: 866 return stopinst.value
in load_build(self) 1221 setstate = getattr(inst,
"__setstate__", None) 1222 if setstate:-> 1223
setstate(state) 1224 return 1225 slotstate =
in __setstate__(self, state) 144 def __setstate__(self, state):
   145 conv_pickle_state(state)--> 146
self.__init__(**overlay(dmask(state, ["kwargs"]), **state["kwargs"]))
  147 148 def get_bs(self):
KeyError: 'kwargs'

attachment.html (16 KB)

Are you sure you are using the same graph-tool version in both machines?


That was it, missed the update to 2.19. Thanks!

attachment.html (1.73 KB)