sagemaker-tensorflow-training-toolkit icon indicating copy to clipboard operation
sagemaker-tensorflow-training-toolkit copied to clipboard

[Minor] script-mode branch lacks Dockerfile patch to deal with S3 response timeout configurability

Open zmjjmz opened this issue 7 years ago • 4 comments

Hey there,

A while back (like, a year ago) I encountered this issue where the environment variable S3_REQUEST_TIMEOUT_MSEC was unset in the SageMaker containers, causing the saving of large checkpoints (e.g., an embedding lookup table) to fail and stopping the training job.

This is resolved (as mentioned in the linked issue) by just changing that environment variable to a larger timeout, which can be done in the entrypoint thru os.environ. However it's undocumented as far as SageMaker is concerned, and I think that this patch in the master branch of this container allows this to be set to a reasonable value and avoid this issue.

I'm not sure if this patch should be applied to the new containers or if there's a better solution (or even just documenting that this needs to be set), but it's important if users want to save checkpoints to S3 (e.g., for distributed training).

zmjjmz avatar Jan 16 '19 16:01 zmjjmz

Hi @zmjjmz,

Thanks for the suggestion. We are currently working on improving the S3 limitation for large files and will have this bug fixed soon.

We will update this ticket when the feature is released.

mvsusp avatar Jan 19 '19 00:01 mvsusp

@zmjjmz We have released the bug fix to our TensorFlow containers. This fix addresses a collection of S3 related errors and improves performance for s3 file upload. You should be able to remove S3_REQUEST_TIMEOUT_MSEC now. Note that the fix is only applied to the 1.12 containers. Please let us know if the training job still fails.

icywang86rui avatar Jan 29 '19 23:01 icywang86rui

@icywang86rui thank you, this is a problem we're trying to deal with on AWS. Could you point me to the commit that has the fix and/or a description on how it was fixed?

albertlim avatar Apr 04 '19 21:04 albertlim

@albertlim We have released our containers with a special TensorFlow binary. This binary is built with this change - https://github.com/tensorflow/tensorflow/pull/24054 This change patches the TF S3 plugin. You can find more details from the pr description.

Please let us know if you have more questions.

icywang86rui avatar Apr 08 '19 23:04 icywang86rui