Skip to content

test_unet_mlm_matches_example_json AssertionError: Generated STAC Item does not match the saved example. #133

@rbavery

Description

@rbavery

🐛 Bug Report

In this test, the expected metadata stored in item_pytorch_geo_unet.json does not match the parsed metadata from the unet model weights from Torchgeo

tests/torch/test_unet_mlm.py:23: in test_unet_mlm_matches_example_json
    assert item == expected, "Generated STAC Item does not match the saved example."
E   AssertionError: Generated STAC Item does not match the saved example.
Band names changed: The model now reports B8 instead of B8A
Value scaling removed: The model previously had z-score normalization [{'mean': 0, 'stddev': 3000, 'type': 'z-score'}] but now returns an empty list []

🔬 How To Reproduce

Steps to reproduce the behavior:

  1. make test

Environment

  • OS: Mac
  • 3.11
  • latest/main

📈 Expected behavior

test passes. Or do we need this test? It seems to be checking behavior we don't control in TorchGeo, they can change how metadata gets stored. I'd be fine with removing and testing this a different way with mocks so that we don't have an upstream dependency on torchgeo for this test.

📎 Additional context

This test functionality was added by CRIM I believe, could y'all take a look and confirm if we need this test as is or if it should be changed?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions