-
Notifications
You must be signed in to change notification settings - Fork 347
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
SSL4EO-L: add new dataset #1332
Conversation
tests/datasets/test_ssl4eo.py
Outdated
def dataset(self, monkeypatch: MonkeyPatch, request: SubRequest) -> SSL4EOS12: | ||
monkeypatch.setitem( | ||
monkeypatch.setitem( # type: ignore[arg-type] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.seasons = seasons | ||
self.transforms = transforms | ||
|
||
self.scenes = sorted(os.listdir(root)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will replace this with integer indexing after we remap the folder names.
torchgeo/datasets/ssl4eo.py
Outdated
_Metadata = TypedDict( | ||
"_Metadata", {"filename": str, "md5": str, "bands": list[str]} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypedDict allows us to remove all uses of Any and cast! We should try to use this in more places.
@@ -121,7 +298,7 @@ def __init__( | |||
RuntimeError: if dataset is missing or checksum fails | |||
""" | |||
assert split in self.metadata | |||
assert seasons in range(4) | |||
assert seasons in range(1, 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bug, oops
Remaining TODOs: