IBM / terratorch

a Python toolkit for fine-tuning Geospatial Foundation Models (GFMs).
Apache License 2.0
151 stars 20 forks source link

Feature/encoder decoder factory #186

Closed CarlosGomes98 closed 2 days ago

CarlosGomes98 commented 2 weeks ago

This pr addresses #135

It does quite a few things:

As future steps after this is merged, a lot of existing factories can either be removed / deprecated (as with PrithviModelFactory) or simplified greatly.

This PR does not break PrithviModelFactory, but modifies it to use the EncoderDecoderFactory. It is marked as deprecated and should be removed in the future. But for now this should not break any back compatibility.

Joao-L-S-Almeida commented 2 days ago

@CarlosGomes98 @romeokienzler General comment. I reviewed the new way to define factories and registries. I believe it simplifies the entire process and introduces clarification for some parts (specially for the registries). Even though it creates some conflicts for two open PRs, I believe it's easier to solve these conflicts when these modifications are already in the main branch. Especially considering that the pretraining and mmseg PRs are not so urgent.

CarlosGomes98 commented 2 days ago

@CarlosGomes98 @romeokienzler General comment. I reviewed the new way to define factories and registries. I believe it simplifies the entire process and introduces clarification for some parts (specially for the registries). Even though it creates some conflicts for two open PRs, I believe it's easier to solve these conflicts when these modifications are already in the main branch. Especially considering that the pretraining and mmseg PRs are not so urgent.

Thanks for the work reviewing this! I know it was a lot :)