Skip to content

[Tech debt] Remove deprecated code#661

Open
robmarkcole wants to merge 4 commits into
masterfrom
remove-metric-mode
Open

[Tech debt] Remove deprecated code#661
robmarkcole wants to merge 4 commits into
masterfrom
remove-metric-mode

Conversation

@robmarkcole

@robmarkcole robmarkcole commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

As title. Tests may be overkill

There are many more deprecations that can be addressed:

  • 2026-03-01: Legacy raster format config {"name": ...} in rslearn/config/dataset.py.
  • 2026-03-01: Legacy data source config {"name": ...} in rslearn/config/dataset.py.
  • 2026-03-01: Ignoring invalid max_cloud_cover in old Planetary Computer Sentinel-2 configs in rslearn/config/dataset.py.
  • 2026-04-01: SimpleTimeSeries.image_channels in rslearn/models/simple_time_series.py.
  • 2026-04-01: Dict form of SimpleTimeSeries.image_keys in rslearn/models/simple_time_series.py.
  • 2026-04-01: Normalize.num_bands in rslearn/train/transforms/normalize.py.
  • 2026-04-01: SelectBands.num_bands_per_timestep in rslearn/train/transforms/select_bands.py.
  • 2026-04-01: Legacy timesteps in rslearn/models/olmoearth_pretrain/model.py.
  • 2026-05-01: SpaceMode.PER_PERIOD_MOSAIC in rslearn/config/dataset.py.
  • 2026-05-01: Fallback to item-level time range for single-timestep RasterImage in rslearn/train/dataset.py.
  • 2026-06-01: RegressionTask.metric_mode and PerPixelRegressionTask.metric_mode removed in the current changes.
  • 2026-08-01: BandSetConfig.nodata_vals in rslearn/config/dataset.py.

@favyen2

favyen2 commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Thanks, I agree this can be removed now, and agree about the tests being unnecessary.

@robmarkcole robmarkcole changed the title Remove deprecated metric_mode option Remove deprecated code Jun 7, 2026
@robmarkcole robmarkcole changed the title Remove deprecated code [Tech debt] Remove deprecated code Jun 7, 2026
@robmarkcole

robmarkcole commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator Author

Implemented_ removal of ALL the listed deprecated features.

Removed compatibility paths for:

  • Legacy raster format {"name": ...}
  • Legacy data source {"name": ...}
  • Ignoring invalid max_cloud_cover in old PC Sentinel-2 configs
  • SimpleTimeSeries.image_channels
  • dict form of SimpleTimeSeries.image_keys
  • Normalize.num_bands
  • SelectBands.num_bands_per_timestep
  • OLMoEarth legacy timestamps
  • SpaceMode.PER_PERIOD_MOSAIC
  • single-timestep RasterImage fallback to item-level time range

Also removed the related per_period_mosaic_reverse_time_order compatibility option because it only existed for the old period mosaic ordering behavior.

…ed warnings

- Removed `use_legacy_timestamps` parameter from OlmoEarth and related classes.
- Updated timestamp handling to align with new implementation, ensuring compatibility with future versions.
- Cleaned up deprecated code and warnings related to legacy timestamp handling across various modules.
- Adjusted tests to reflect the removal of legacy timestamp functionality and ensure proper handling of current timestamp logic.
- Removed deprecated parameters and functionality from SimpleTimeSeries and SelectBands transforms.
- Updated dataset reading functions to eliminate reliance on deprecated time range extraction methods.
- Cleaned up test cases to remove legacy compatibility checks and ensure alignment with current implementation.
@favyen2

favyen2 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

I think we are not quite ready to remove these yet.

@robmarkcole

Copy link
Copy Markdown
Collaborator Author

@favyen2 feel free to close this & reopen later as you see fit

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.

2 participants