MCPcopy Create free account
hub / github.com/SeldonIO/seldon-server / __getstate__

Method __getstate__

python/seldon/tensorflow_wrapper.py:65–76  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 self.vectorizer = None
64
65 def __getstate__(self):
66 result = self.__dict__.copy()
67 del result['sess']
68 del result['tf_input']
69 del result['tf_output']
70 del result['tf_constants_vars']
71 self.save(self.tmp_model)
72 with open('%s/tensorflow-model.meta'%self.tmp_model, mode='rb') as metafile:
73 result['_meta'] = metafile.read()
74 with open('%s/tensorflow-model'%self.tmp_model, mode='rb') as modelfile:
75 result['_model'] = modelfile.read()
76 return result
77
78 def __setstate__(self,dict):
79 self.__dict__ = dict

Callers

nothing calls this directly

Calls 2

saveMethod · 0.95
copyMethod · 0.80

Tested by

no test coverage detected