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

Method __getstate__

python/seldon/keras.py:102–108  ·  view source on GitHub ↗

Remove parts of class that cause issue in pickling. Can recreate them in setstate

(self)

Source from the content-addressed store, hash-verified

100 self.compiled_model_ = None
101
102 def __getstate__(self):
103 """Remove parts of class that cause issue in pickling. Can recreate them in setstate
104 """
105 result = self.__dict__.copy()
106 del result['compiled_model_']
107 del result['model_create']
108 return result
109
110 def __setstate__(self, dict):
111 """Create compiled model from parameters. saving model to file and loading it back in

Callers

nothing calls this directly

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected