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

Checkpoint saving isn't atomic #688

Closed
fgerzer opened this issue Jan 15, 2020 · 0 comments · Fixed by #689
Closed

Checkpoint saving isn't atomic #688

fgerzer opened this issue Jan 15, 2020 · 0 comments · Fixed by #689
Labels
bug Something isn't working

Comments

@fgerzer
Copy link
Contributor

fgerzer commented Jan 15, 2020

🐛 Bug

Saving checkpoints happens non-atomically. In some cases, this causes an incomplete write of a checkpoint (for example when receiving a SIGKILL during writing), causing any subsequent loading to fail with
RuntimeError: unexpected EOF, expected 8 more bytes. The file might be corrupted.

To Reproduce

This is difficult to reproduce, since it relies on timing outside of code. For me, it happens with fast-running models that run at ~1-4 seconds per epoch.

Expected behavior

Checkpointing should be resistant to such issues, and instead simply continue as-is.

@fgerzer fgerzer added the bug Something isn't working label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant