Menu

1 / 2

How do you save training checkpoints to S3 or GCS safely?

DEV Community: pytorch·Viswaretas Kotra·4 days ago
#8F3zJiC8
#devtopytorch#devto#dev#checkpoint#manifest
Long article (2255 words) — no AI summary yet.
Reading 0:00
15s threshold

Amazon S3 and Google Cloud Storage make each upload atomic but not a checkpoint made of several files, so save safely by uploading the files under a new step prefix, then a manifest of their sizes and SHA-256 hashes, then a latest pointer last. Resume by following the pointer and verifying the hashes; on Nodus, a Job writes to /nodus/state and Nodus stores, commits and restores the checkpoint for you. In our crash test, that order resumed a verified checkpoint at all 9 crash points, while overwriting fixed keys silently paired a new model with an old optimizer at 5 of 7.

This post is about the storage layer: getting the bytes into a bucket and finding the last good checkpoint after a crash. For what goes inside the checkpoint (model, optimizer, scheduler, RNG, data position), see how to save and resume PyTorch checkpoints .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.