Remove parts of class that cause issue in pickling. Can recreate them in setstate
(self)
| 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 |