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

Improve local temp directory error when only remote is specified #683

Merged
merged 10 commits into from
May 23, 2024

Conversation

snarayan21
Copy link
Collaborator

Description of changes:

Improves the local temp directory error when only a remote path is specified. We want to make sure that if local is unspecified, we still create an entirely new temporary directory to hold the shard files, but if a user wants to reuse their locally cached dataset, they should explicitly specify the local argument.

Issue #, if available:

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.

@snarayan21 snarayan21 requested a review from karan6181 May 22, 2024 20:45
Copy link
Member

@XiaohanZhangCMU XiaohanZhangCMU left a comment

Choose a reason for hiding this comment

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

LGTM

@karan6181
Copy link
Collaborator

Can we please add a unit test for the same? :D

@snarayan21
Copy link
Collaborator Author

added unit test @karan6181

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.

You can merge the PR after the CI passes.

@snarayan21
Copy link
Collaborator Author

@karan6181 @XiaohanZhangCMU I was trying to fix the test that I wrote, but I realized there's also a test_existing_local_raises_exception in test_stream.py that tests this already. Are we good with merging the PR without me adding an additional test then?

@karan6181
Copy link
Collaborator

@karan6181 @XiaohanZhangCMU I was trying to fix the test that I wrote, but I realized there's also a test_existing_local_raises_exception in test_stream.py that tests this already. Are we good with merging the PR without me adding an additional test then?

Yes, it's okay to merge since the unit test is already in place. To make CI pass, you might want to change the exception type from ValueError to FileExistsError in test_existing_local_raises_exception().

@snarayan21 snarayan21 merged commit fe81396 into main May 23, 2024
8 checks passed
@snarayan21 snarayan21 deleted the saaketh/local_dir_error branch May 23, 2024 18:14
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.

3 participants