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 a retry logic with backoff and jitter #448

Merged
merged 9 commits into from
Sep 28, 2023
Merged

Conversation

karan6181
Copy link
Collaborator

@karan6181 karan6181 commented Sep 26, 2023

Description of changes:

  • Add a retry logic with backoff and jitter to upload and download functionality
  • Enqueue the index.json upload after all the shard uploads has been finished.
  • Kill the main thread if one of the upload threads receives Exception.

Issue #, if available:

STR-136
#451

Testing

Integration testing

- UC Volume

  • Verified that I am able to see the REQUEST_LIMIT_EXCEEDED exception by spinning approx. 500 processes where it hits the 400 request limit per secs.
  • Having more than one attempts doesn't crash the job since it retries downloading the shard file again.
  • Verified FileNotFound Exception from UC Volume by providing a corrupt path.

- Other cloud providers

  • Tested invalid path with S3 and OCI and able to see the relevant FileNotFound Exception.
  • Ran single node model training on S3 and OCI with correct dataset path and I don't see an Exception.

Merge Checklist:

Put an x without space in the boxes that apply. If you are unsure about any checklist, please don't hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the contributor guidelines
  • This is a documentation change or typo fix. If so, skip the rest of this checklist.
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the MosaicML team.
  • I have updated any necessary documentation, including README and API docs (if appropriate).

Tests

  • I ran pre-commit on my change. (check out the pre-commit section of prerequisites)
  • I have added tests that prove my fix is effective or that my feature works (if appropriate).
  • I ran the tests locally to make sure it pass. (check out testing)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes.

@karan6181 karan6181 marked this pull request as ready for review September 27, 2023 23:57
Copy link
Collaborator

@snarayan21 snarayan21 left a comment

Choose a reason for hiding this comment

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

Some minor comments, other than that lgtm. Using the package might be easier down the road but this also works

streaming/base/dataset.py Show resolved Hide resolved
streaming/base/storage/upload.py Outdated Show resolved Hide resolved
streaming/base/util.py Show resolved Hide resolved
Copy link
Contributor

@knighton knighton left a comment

Choose a reason for hiding this comment

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

Noice

@karan6181 karan6181 merged commit 8ea83ae into mosaicml:main Sep 28, 2023
6 checks passed
@karan6181 karan6181 deleted the retry branch September 28, 2023 18:19
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.

4 participants