Skip to content

Inference model and adopted (pre-trained) geo-encoders#72

Merged
gabrieletijunaityte merged 81 commits into
developfrom
aligment_experiments
Apr 15, 2026
Merged

Inference model and adopted (pre-trained) geo-encoders#72
gabrieletijunaityte merged 81 commits into
developfrom
aligment_experiments

Conversation

@gabrieletijunaityte
Copy link
Copy Markdown
Contributor

@gabrieletijunaityte gabrieletijunaityte commented Apr 7, 2026

What does this PR do?

Changes:

  • Checkpoints now save model hyperparameters, to allow model intialisation without the need for a configuration file.
  • Tessera tile requests fixed. Downloads and merges tiles in npy and tif, fills missing values with 0s.
  • Add missing forward pass through extra-geo-projector

Introduces:

  • Inference model which:
    • can be initialised given alignment and predictive model checkpoints (with some sanity check, e.g., if geo_encoders share architecture).
    • can be initialised from a merged checkpoint.
  • Adopt encoder function which allows to initialise pre-trained geo-encoder based on a checkpoint.
  • Identity encoder, which just passes through the input
  • Elbow-k calculation for validation concept retrieval tasks.

Before submitting

  • Did you make sure title is self-explanatory and the description concisely explains the PR?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you test your PR locally with pytest command?

gabrieletijunaityte and others added 30 commits March 25, 2026 21:43
This is needed for the inference model re-configuration
…aligment_experiments

# Conflicts:
#	src/models/text_alignment_model.py
in case outside of radius_max, return radius_max
manually picked relevant captions for biodiv UC, inspecting histograms to look for sensible thresholds.
…atures.

# Conflicts:
#	tests/test_yield_africa.py
@gabrieletijunaityte gabrieletijunaityte marked this pull request as ready for review April 10, 2026 12:38
Copy link
Copy Markdown
Collaborator

@vdplasthijs vdplasthijs left a comment

Choose a reason for hiding this comment

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

Great stuff, looks very neat! Just a few minor things, I'll approve so have a look and merge when you're happy.

Comment thread src/models/components/geo_encoders/encoder_wrapper.py Outdated
Comment thread src/models/components/metrics/metrics_wrapper.py
Comment thread src/models/base_model.py Outdated
Comment thread src/models/inference_model.py Outdated
Comment thread src/data/heat_guatemala_dataset.py
@gabrieletijunaityte gabrieletijunaityte merged commit a5d7ace into develop Apr 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants