geo-deep-learning icon indicating copy to clipboard operation
geo-deep-learning copied to clipboard

JaccardIndex: Torchmetrics v0.9 "average" argument replaces "reduction"

Open remtav opened this issue 2 years ago • 1 comments

Though new conda environments created with GDL's environment.yml will install torchmetrics > 0.9 (see screenshot below), this library and version requirement is not explicit in this file since torchmetrics is a requirement of an already-required torchgeo. Unfortunately, torchgeo only requires torchmetrics >0.7.

With the recently added unit tests, we've experienced some problems with a change in argument name for torchmetrics' JaccardIndex before and after v0.9. The "reduction" parameter has been changed to "average", causing failure of IoU unit tests with older pre-existing conda environments.

Though we'd prefer minimizing the amount of libraries explicitly required in GDL, it seems necessary at this point to force the installation of torchmetrics > 0.9

ksnip_20220929-100635

remtav avatar Oct 03 '22 16:10 remtav

Let's see if we can solve this problem through torchgeo's version requirement for torchmetrics first: https://github.com/microsoft/torchgeo/issues/805

remtav avatar Oct 03 '22 16:10 remtav

Solved through torchgeo: https://github.com/microsoft/torchgeo/pull/832/files Yeah! I'll still be opening a PR to bump torchgeo requirement to >0.3 We can also see that new environments on Ubuntu (also successfully tested on Windows) install torchmetrics 0.9 and torchgeo 0.3 Ubuntu - github CI: https://github.com/remtav/geo-deep-learning/actions/runs/3266358501/jobs/5369977578#step:7:603

remtav avatar Oct 18 '22 19:10 remtav