andreped / super-ml-pets

🐢 AI for Super Auto Pets
MIT License
31 stars 13 forks source link

RuntimeWarning #37

Closed GoldExplosion closed 1 year ago

GoldExplosion commented 2 years ago

I keep getting this runtime warning. Not sure if this is specific to me or everyone is getting this.

C:\Users\jivit\anaconda3\envs\super\lib\site-packages\skimage\metrics_structural_similarity.py:230: RuntimeWarning: invalid value encountered in divide S = (A1 * A2) / D

The project still work after this warning.

andreped commented 2 years ago

Yes, this has to do with calculation of SSIM when the image is completely black (probably). Which happens in the transition after a game (I think). Anyways, I don't really think this is a big issue, but it is likely better to catch this warning, but we don't need to do a lot of changes, IMO. It does not break anything.

andreped commented 1 year ago

Fixed in 12225da86efa71ce11c949ce3373d4c2b4a01706.

As this is not a critical error, I just added a try-catch block. This warning can be disregarded otherwise.