Closed ntoxeg closed 2 months ago
Thanks for reporting the bug and proposing an initial patch! Very much appreciated.
This issue has been addressed in another PR, along with a couple minor fixes underlying the reason for the filter failure in the first place. See my comments here: https://github.com/pinder-org/pinder/pull/18#issue-2543449320
I will go ahead and close this PR, but let us know if you're still running into any issues!
This fixes a problem I’ve had with loading some data, in particular with the following setup:
The problematic item is specifically at the index 7739:
What happens is that I get the same error message repeated 10 times:
This is of course because a new random index to load at is not in fact sampled, so the same record is tried to be loaded 10 times. Thus, the maximum number of attempts gets exhausted and that results in the
IndexError
and failure to load more data. This is caused by the fact that filtering fails atapply_dimer_filters
and the iteration simply gets skipped immediately after, so the index to load stays the same. I have simply repeated the logic of failure atapply_structure_filters
to choose a new index for the next attempt.