circleguard/circlecore

numpy errors on relax detect

Closed this issue · 3 comments

tybug commented

Discovered while checking the ur for this user (osureport thread).

When running RelaxDetect on his replays on maps 2201553, 1905558, or 2189358, numpy throws:

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/_methods.py:140: RuntimeWarning: Degrees of freedom <= 0 for slice
  keepdims=keepdims)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/_methods.py:110: RuntimeWarning: invalid value encountered in true_divide
  arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/numpy/core/_methods.py:132: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)

(yes this was the full stacktrace that got printed), and the resulting ur is nan.

The aforementioned user used relax as mentioned on the reddit thread, so their account won't be up for long; I've downloaded the replays but don't have a good way to attach them here. These are the download links:

https://osu.ppy.sh/scores/osu/2939969869/download
https://osu.ppy.sh/scores/osu/2899139843/download
https://osu.ppy.sh/scores/osu/2928606949/download

Reproducing code (while account lasts):

from circleguard import *
cg = Circleguard("key", db_path="./db.db")
rm = ReplayMap(2201553, 13216706) // sub either of the other two map_ids in for the same result
c = Check(rm, RelaxDetect())
list(cg.run(c))

cc @samuelhklumpers

fyi this is fixed on #118, though it should be put into consideration when optimizing that branch

tybug commented

Not sure when this got fixed...but it doesn't seem to error any more