Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the ML prediction pipeline to support multi-dimension feature vectors (e.g., flattening ["bands", "t"]), improves performance of certain spatial operations by using spatial indexes, and adds packaging/publishing metadata for distribution.
Changes:
- Add
dimensionto model factory functions and persist feature-dimension metadata throughml_predictand STAC save/load. - Update raster stacking utilities to accept multiple feature dimensions and adjust ML tests accordingly.
- Introduce spatial-index based filtering in vector/raster ops, plus PyPI metadata and a release publish workflow.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
openeo_core/ops/vector.py |
Switch filter_bbox to spatial-index queries (but predicate currently inverts intended behavior). |
openeo_core/ops/raster.py |
Use spatial index in aggregate_spatial; allow stack_to_samples / unstack_from_samples to accept multi-dim features. |
openeo_core/model/base.py |
Add dimension parameter to model factories; ml_predict now derives feature dims from the model; save/load persists dims. |
openeo_core/model/mlm.py |
Add _feature_dims field to MLModel. |
tests/test_model_torch.py |
Update PyTorch model tests for flattened multi-dimension features and dimension defaults/customization. |
tests/test_model_sklearn.py |
Add tests covering dimension=["bands","t"] flattening and default-dimension behavior. |
pyproject.toml |
Add project metadata (keywords/classifiers/URLs) and extras (incl. ml-torch, all). |
README.md |
Document feature dimensions and add usage/examples + badges. |
.github/workflows/publish.yml |
Add GitHub Actions workflow to build and publish releases to TestPyPI then PyPI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tack_from_samples Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
…s" is correct Clarify sindex predicate semantics in filter_bbox; predicate="contains" is correct
…rom_samples Validate non-empty feature_dim list in stack_to_samples and unstack_from_samples
…ict` Fix silent fallback when `_feature_dims` is an empty list in `ml_predict`
Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
Validate `dimension` parameter in MLModel factory functions
Remove unused logging import and logger from vector.py
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ility Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
Co-authored-by: PondiB <16879290+PondiB@users.noreply.github.com>
…ards compatibility Restore `feature_dim` as a deprecated kwarg on `ml_predict` for backwards compatibility
…is correct Clarify filter_bbox sindex predicate semantics; predicate="contains" is correct
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.