aws-samples / aws-samples/amazon-sagemaker-managed-spot-training
Saving checkpoints at interrupt
- Dominant language
- Jupyter Notebook
- Stars
- 49
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Thank you for providing example implementations!
I was wondering what signal is sent to the docker container when spot training job are interrupted. Is it SIGKILL or SIGTERM with some grace period (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_StopTrainingJob.html)?
I was looking to implement a signal handler which, on SIGTERM, saves the latest checkpoint to S3. That way, resume happens from the exact point in time.
Is this possible? Do we need to account for the time it takes for the uploader service to upload the content of `/opt/ml/checkpoints` to the `checkpoint_s3_uri`?
Any guidelines on how to resume from the latest stop point is much appreciated
Contributor guide
Assessment
This issue has not been assessed yet.