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 support for downloading from Unity Catalog volumes #361

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

maddiedawson
Copy link
Contributor

@maddiedawson maddiedawson commented Aug 3, 2023

Description of changes:

This change allows users to upload data to and download data from Databricks Unity Catalog.

To configure authentication using mcli, user would run:

mcli create secret env DATABRICKS_HOST=...
mcli create secret env DATABRICKS_TOKEN=...

Env vars consistent with https://databricks-sdk-py.readthedocs.io/en/latest/authentication.html

Issue #, if available:

STR-116

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.

Copy link
Collaborator

@karan6181 karan6181 left a comment

Choose a reason for hiding this comment

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

Overall looks great. Few minor comments:

  • Can you also add the similar functionality in upload.py which basically uploads the shard files in UC during dataset conversion? You can look at PR 311 and 265 for reference.
  • Can you also add a unit test for the same in test_download.py and test_upload.py ?
  • Can you also update the documentation with UC Volume section on how user would provide a credentials ?

Thanks!

streaming/base/storage/util.py Outdated Show resolved Hide resolved
streaming/base/storage/util.py Outdated Show resolved Hide resolved
@maddiedawson maddiedawson changed the title Add utils to check and set UC token Add support for downloading from Unity Catalog volumes Aug 10, 2023
@maddiedawson
Copy link
Contributor Author

Overall looks great. Few minor comments:

  • Can you also add the similar functionality in upload.py which basically uploads the shard files in UC during dataset conversion? You can look at PR 311 and 265 for reference.

Done

Done

  • Can you also update the documentation with UC Volume section on how user would provide a credentials ?

Done

Thanks!

@karan6181
Copy link
Collaborator

The PR looks good to me, Can you rebase the PR and then fixed the lint issue which I mentioned in PR 362? Thanks!

Run pre-commit

Add uc:// support

Fix file reading

Move _download_file back

Use urlparse

Rename env vars

Create client

Fix import and add commeent

Address comments

Remove util.py

Undo download.py refactor

Fix import
@karan6181 karan6181 merged commit 744665c into mosaicml:main Aug 23, 2023
5 checks passed
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