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

Use fsspec in load to resolve more paths/URLs from storage backends #3692

Merged
merged 3 commits into from
Oct 3, 2020

Conversation

ananthsub
Copy link
Contributor

What does this PR do?

Fixes #3691

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@mergify mergify bot requested a review from a team September 28, 2020 04:28
ananthsub added a commit to ananthsub/pytorch-lightning that referenced this pull request Sep 28, 2020
@Borda Borda added the feature Is an improvement or enhancement label Sep 28, 2020
pytorch_lightning/utilities/cloud_io.py Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team September 28, 2020 07:44
@Borda
Copy link
Member

Borda commented Sep 28, 2020 via email

williamFalcon pushed a commit that referenced this pull request Sep 28, 2020
… more storage backends (#3694)

* Split out changes from #3563 to make that PR easier to review. This formats the file according to the Black formatter

* Store a reference to the trainer on the datamodule

Fixes #3682

* Update data_connector.py

* Update data_connector.py

* Update test_datamodules.py

* Support more storage backends in trainer.test using best weights

Similar to #3692

* Update trainer.py

* Update trainer.py

use cloud_io load directly
@ananthsub
Copy link
Contributor Author

@Borda @awaelchli aiohttps needs to be included in the dependencies for the tests to run

@williamFalcon
Copy link
Contributor

@ananthsub so this adds a dep to PL?

@ananthsub
Copy link
Contributor Author

@williamFalcon it should already be there from relying on fsspec. https://github.com/intake/filesystem_spec/blob/master/setup.py#L45

from @awaelchli

oh so it needs be installed with [http] as brackets
before we didn't get that because http was redirected to torch.hub.load
yep, so if I do pip install fsspec[http], i get the aiohttp
I guess we need at least http for the CI test suite

@Borda
Copy link
Member

Borda commented Sep 28, 2020

@ananthsub so this adds a dep to PL?

if it is just for testing we are fine...

@ananthsub
Copy link
Contributor Author

@Borda any pointers on how to include fsspec's http dependencies for the tests?

@Borda
Copy link
Member

Borda commented Sep 29, 2020

@Borda any pointers on how to include fsspec's http dependencies for the tests?

Let me see, the case is that as we install requirements/devel.txt which chain all and pip do not like listed one package twice...

@Borda
Copy link
Member

Borda commented Sep 29, 2020

@Borda any pointers on how to include fsspec's http dependencies for the tests?

it seems that you already added them manually:
https://github.com/intake/filesystem_spec/blob/974e9c9b172f39816d929fe51e604ff7829ce1d3/setup.py#L45

requirements/test.txt Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team September 29, 2020 14:28
requirements/test.txt Outdated Show resolved Hide resolved
pytorch_lightning/utilities/cloud_io.py Show resolved Hide resolved
@mergify mergify bot requested a review from a team September 29, 2020 14:48
@Borda
Copy link
Member

Borda commented Sep 29, 2020

@awaelchli I have tried #3692 (comment) and it was the same, then I reverted the change...

@codecov
Copy link

codecov bot commented Oct 3, 2020

Codecov Report

Merging #3692 into master will increase coverage by 4%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #3692    +/-   ##
=======================================
+ Coverage      84%     88%    +4%     
=======================================
  Files         111     112     +1     
  Lines        8756    8915   +159     
=======================================
+ Hits         7354    7809   +455     
+ Misses       1402    1106   -296     

@williamFalcon williamFalcon merged commit 8dd37e7 into Lightning-AI:master Oct 3, 2020
@Borda Borda added this to the 0.10.0 milestone Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloud_io's load should use fsspec for compatibility with more storage systems
4 participants