photosynthesis-team / piq

Measures and metrics for image2image tasks. PyTorch.
Apache License 2.0
1.41k stars 120 forks source link

Bug in __version_tuple function #289

Closed Volodimirich closed 2 years ago

Volodimirich commented 2 years ago

Bug in __version_tuple() function, for pytorch version 1.10.0a0+ecc3718

Steps to reproduce the behavior:

  1. Install last pytorch version, I met this bug in google colab
  2. Use srssim.
  3. Function will fall, because can't cast string with letters to

Screenshot: photo_2022-02-03_22-28-21

zakajd commented 2 years ago

Thanks for reporting! @snk4tr can you please take a look?

snk4tr commented 2 years ago

@zakajd I'm on it 👍

snk4tr commented 2 years ago

The problem is that this string is not a valid semver version. It seems that PyTorch follows a much broader versioning protocol PEP-440 and uses versions from the broader scope for automated releases (such as NGC container ones). I am implementing a broader parser to handle that.

snk4tr commented 2 years ago

Lol, it is even funnier. Actually, PEP 440 versions do not include all valid Simver versions and vice versa e.g.:

Hence, since PyTorch mixes up both systems, we gotta have parsers for both systems.