-
Notifications
You must be signed in to change notification settings - Fork 44
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
TerraTorch fit raises KeyErrors in segmentation_tasks.py #22
Comments
@Joao-L-S-Almeida Thanks for have a look at this! |
Hi @rhprasad0 , if I understand correctly you made changes to the segmentation task class. Could you share those, as well as the configuration yaml you used? |
I was getting keyerrors with the provided sen1floods yaml. My customizations had no effect on the behavior I was experiencing. Is this something you can reproduce on your end with a fresh install? If not, I will make a video. |
Does this look right?
|
@rhprasad0 thanks so much for pointing this out. I tracked this down and it seems to be related to version I've created the PR #25 which locks lightning to version "<=2.2.5", and should fix this for now. For the future we will have to adapt to how lightning now handles things. On your end, if you run |
This got me unblocked! Currently training finetuning Prithvi with the default sen1floods11.yaml file with all 6 bands. Next up: 3 bands. Thank you for looking into this, @CarlosGomes98. I wish your work has more attention than it does currently. This is a hell of a lot more convenient than the original Prithvi repo. |
Perhaps this is more of an issue with my individual installation than it is of the TT repo, and am not sure that this is something that you will be able to reproduce on your end. I followed the installation instructions and was able to succesfully import terratorch in the python console.
However, when I call
terratorch fit --config /home/ryan/terratorch/examples/confs/sen1floods11_vit_ryan.yaml
for the Sentinel Floods model, some of the arguments supplied in the configuration file seem to not be read. See the attached screenshot.In segmentation_tasks.py, when I hardcoded
loss
,ignore_index
popped a KeyError. When I hardcodedignore_index
,class_weights
threw a KeyError. It goes on. Not really sure how to debug this - entirely new to PyTorch and Lightning.Thanks for making this software open source for us!

The text was updated successfully, but these errors were encountered: