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

Adds auto object store creation to get_file #1750

Merged
merged 9 commits into from
Nov 22, 2022

Conversation

dakinggg
Copy link
Contributor

@dakinggg dakinggg commented Nov 22, 2022

What does this PR do?

I have had to write code that autoparses the URI to create an S3ObjectStore and then calls get_file with that newly created object store a couple of times, and the util to pull huggingface tokenizer/model out of a composer checkpoint is going to need to do the same, so I added the same auto parsing support as in trainer to the get_file function. It shouldn't change any behavior of any existing code interacting with get_file.

Manual tested that I can download a file from S3 using this, and also that checkpointing/autoresume from S3 still works.

What issue(s) does this change relate to?

Part of CO-1110

Before submitting

  • Have you read the contributor guidelines?
  • Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

@dakinggg dakinggg marked this pull request as ready for review November 22, 2022 02:11
Copy link
Contributor

@eracah eracah left a comment

Choose a reason for hiding this comment

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

Nice LGTM. Maybe at some point we can push ALL the auto-parsing logic to get_file and to upload_file

@dakinggg dakinggg merged commit b5e0834 into mosaicml:dev Nov 22, 2022
dakinggg added a commit to dakinggg/composer that referenced this pull request Nov 24, 2022
Adds auto object store creation to `get_file`
@dakinggg dakinggg deleted the download_helper branch November 30, 2022 22:07
bmosaicml pushed a commit to bmosaicml/composer that referenced this pull request Dec 13, 2022
Adds auto object store creation to `get_file`
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.

2 participants