Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experiment flag to pickle only on checkpoints #224

Conversation

nmatthews-asapp
Copy link
Contributor

Resolves #223

jeremyasapp
jeremyasapp previously approved these changes Jan 29, 2020
@jeremyasapp
Copy link
Contributor

I would recommend adding logic for supporting torch as the protocol

@@ -153,13 +155,19 @@ def _train(self) -> Dict:
def _save(self, checkpoint_dir: str) -> str:
"""Subclasses should override this to implement save()."""
path = os.path.join(checkpoint_dir, "checkpoint.flambe")
self.block.save(path, pickle_only=self.pickle_checkpoints, overwrite=True)
if self.pickle_checkpoints:
torch.save(self.block, path, pickle_module=dill)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no overrite here?

Also still no way of selecting torch instead of dill?

@jeremyasapp jeremyasapp deleted the issue-223_pickle-experiment-chkpts_nmatthews-asapp branch February 21, 2020 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow pickle for saving checkpoints in Experiment
2 participants