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

DataModules: only instantiate when download requested #974

Merged
merged 2 commits into from
Dec 25, 2022

Conversation

adamjstewart
Copy link
Collaborator

Closes #967

@github-actions github-actions bot added datamodules PyTorch Lightning datamodules testing Continuous integration testing labels Dec 24, 2022
@@ -19,7 +19,11 @@ def datamodule(self) -> LoveDADataModule:
scene = ["rural", "urban"]

dm = LoveDADataModule(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file will be deleted in #966, this is only temporary

Comment on lines 46 to 47
:class:`~torchgeo.datasets.NAIP` (prefix keys with naip_) and
:class:`~torchgeo.datasets.Chesapeake13` (prefix keys with chesapeake_)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When I first added this I was lazy and didn't provide a way to separate these. This seems like a good solution to me.

Comment on lines -106 to -111
def prepare_data(self) -> None:
"""Make sure that the dataset is downloaded.

This method is only called once per run.
"""
So2Sat(**self.kwargs)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This dataset cannot be automatically downloaded, no reason to prepare_data

@adamjstewart adamjstewart added this to the 0.3.2 milestone Dec 24, 2022
@adamjstewart adamjstewart merged commit b7add14 into main Dec 25, 2022
@adamjstewart adamjstewart deleted the datamodules/download branch December 25, 2022 18:21
@adamjstewart adamjstewart modified the milestones: 0.3.2, 0.4.0 Jan 23, 2023
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
* DataModules: only instantiate when download requested

* Fix docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodules PyTorch Lightning datamodules testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataModules: skip prepare_data
2 participants