open-spaced-repetition / fsrs4anki-helper

An Anki add-on that supports Postpone & Advance & Load Balance & Easy Days & Disperse Siblings & Flatten
https://ankiweb.net/shared/info/759844606
MIT License
215 stars 18 forks source link

Fix/filter out manual and cram reviews in true retention & use _revlogLimit() #471

Closed L-M-Sherlock closed 1 month ago

L-M-Sherlock commented 1 month ago

fix:

user1823 commented 1 month ago

I don't know why but this doesn't seem to have any effect (apart from the "Deck" vs "Collection" issue).

user1823 commented 1 month ago

Well, that's because the code for true retention already filters the revlogs with ease = 0 and I don't have any revlogs with type = 3 and factor = 0.

L-M-Sherlock commented 1 month ago

Well, that's because the code for true retention already filters the revlogs with ease = 0

The previous version doesn't.

user1823 commented 1 month ago

The previous version doesn't.

It does filter them in the following lines: https://github.com/open-spaced-repetition/fsrs4anki-helper/blob/a459532f73c9772398503491035b7bfbc5f78bdf/stats.py#L389-L392

Anyway, the changes LGTM. They don't solve the issue reported by me, though.

L-M-Sherlock commented 1 month ago

It does filter them in the following lines:

Nope. It just treats them as failed (0). That causes the previous discrepancy.

user1823 commented 1 month ago

Well, these lines include ease = 1 and ease > 1. So, I don't know why you think that the add-on is counting the revlogs with ease = 0.

I think that the discrepancy is corrected because the latest commit in Anki uses the correct code to remove the crammed revlogs. (I am now sure about this because the number of revlog entries with type = 3 and factor != 0 is exactly equal to the size of the discrepancy.)

L-M-Sherlock commented 1 month ago

Fine. The bug has been fixed. It's a good news.