diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-07-06 10:40:23 -0400 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-07-06 10:40:23 -0400 |
commit | 389d8001be77e6cacb35804236fe9d3f0930282b (patch) | |
tree | 6b1ef34b29ad594e295c9ac848e7a8ab231974c3 /ext_saveload.py | |
parent | 66d2717188e189fde5422576740903ca8e488f63 (diff) | |
download | taxi-389d8001be77e6cacb35804236fe9d3f0930282b.tar.gz taxi-389d8001be77e6cacb35804236fe9d3f0930282b.zip |
Blocks compatibility
Diffstat (limited to 'ext_saveload.py')
-rw-r--r-- | ext_saveload.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext_saveload.py b/ext_saveload.py index cc7c47a..059c5cf 100644 --- a/ext_saveload.py +++ b/ext_saveload.py @@ -15,14 +15,14 @@ class SaveLoadParams(SimpleExtension): def do_save(self): with open(self.path, 'w') as f: logger.info('Saving parameters to %s...'%self.path) - cPickle.dump(self.model.get_param_values(), f, protocol=cPickle.HIGHEST_PROTOCOL) + cPickle.dump(self.model.get_parameter_values(), f, protocol=cPickle.HIGHEST_PROTOCOL) logger.info('Done saving.') def do_load(self): try: with open(self.path, 'r') as f: logger.info('Loading parameters from %s...'%self.path) - self.model.set_param_values(cPickle.load(f)) + self.model.set_parameter_values(cPickle.load(f)) except IOError: pass |