Added substation segementation dataset
Hi @rijuld, thanks for the contribution! If you're new to creating PyTorch datasets, I highly recommend reading the following tutorials:
- https://pytorch.org/tutorials/beginner/basics/data_tutorial.html
- https://pytorch.org/tutorials/beginner/data_loading_tutorial.html
The only difference between datasets in torchvision and NonGeoDatasets in TorchGeo is that our __getitem__ returns a dictionary instead of a tuple. Other than that, they share all the same basic components.
Most of your issues seem to be due to the use of args. I think you just need to remove this and explicitly list all parameters in the function signature. This will also simplify your testing code. Take a look at other existing datasets, we have about 75 examples to choose from. If you find one that is similar to your dataset, it shouldn't actually require that many changes to get them working.
Hi @adamjstewart , thanks a ton for the feedback! I will go through this tutorial.
@microsoft-github-policy-service agree
Can you resolve the merge conflict? The order of __all__ changed in the main branch.
Still a lot of missing test coverage, will review in more detail after AGU.
@adamjstewart I'm unsure about how to test the configuration file locally. Additionally, would testing the conf file cover the datamodule as well, or would I need to write separate test cases for the datamodule to ensure adequate code coverage?
I'm unsure about how to test the configuration file locally.
You can get the test name from CI and then run it like so:
> pytest tests/trainers/test_segmentation.py::TestSemanticSegmentationTask::test_trainer[True-substation]
Additionally, would testing the conf file cover the datamodule as well
Yes
We're preparing a 0.7.0 release in the next week or so and I would love to get this dataset in. Do you mind if I push changes directly to your branch to fix the remaining test comments?
We're preparing a 0.7.0 release in the next week or so and I would love to get this dataset in. Do you mind if I push changes directly to your branch to fix the remaining test comments?
Sure! Feel free to push changes directly to my branch. Thanks!