Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors Pixelverse to use TorchGeo's native implementations of the Tessera model and adds support for the Presto model encoder. The refactoring eliminates approximately 300 lines of duplicated Tessera code and modernizes the model registry to leverage TorchGeo's standardized weights and transforms system.
Changes:
- Replaced local Tessera implementation with TorchGeo's tessera and presto models
- Simplified model registry by removing the
pretrainedparameter and always loading pretrained weights - Updated tests, notebooks, and documentation to reflect the new API
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/pixelverse/models/registry.py | Updated to import models from TorchGeo, added Presto support, removed pretrained parameter, added encoder extraction for Presto |
| src/pixelverse/models/tessera.py | Deleted entire file (~300 lines) - now uses TorchGeo implementation |
| src/pixelverse/models/init.py | Removed exports of Tessera and PixelTimeSeriesNormalize classes |
| src/pixelverse/generate_embeddings.py | Removed pretrained parameter from create_model call |
| tests/test_models.py | Added Presto test case with proper input/output validation, updated to use hardcoded input shapes |
| tests/test_generate_embeddings.py | Updated spies to reference TorchGeo's internal classes |
| tests/test_download.py | Removed malformed type ignore comments |
| scripts/export_tessera.py | Deleted export script no longer needed with TorchGeo integration |
| pyproject.toml | Added torchgeo>=0.9 dependency |
| notebooks/sample_embeddings_generation.ipynb | Added rioxarray import, removed pretrained parameter, added .float() conversions |
| README.md | Added documentation for Presto model |
| .gitignore | Added *.zarr to ignore data files |
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactored Pixelverse to use TorchGeo for Tessera instead of local copied Tessera code, and added the Presto model (from the latest TorchGeo) to the model registry.
Also fixed a couple notebook issues and re-ran the sample notebook to make sure it executes with the updated model API.