Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

L-M-Sherlock
Copy link
Member

@L-M-Sherlock L-M-Sherlock commented Sep 29, 2024

@L-M-Sherlock L-M-Sherlock added the bug Something isn't working label Sep 29, 2024
@L-M-Sherlock L-M-Sherlock changed the title Fix/filter out manual and cram reviews in true retention Fix/filter out manual and cram reviews in true retention & user _revlogLimit() Sep 29, 2024
@L-M-Sherlock L-M-Sherlock changed the title Fix/filter out manual and cram reviews in true retention & user _revlogLimit() Fix/filter out manual and cram reviews in true retention & use _revlogLimit() Sep 29, 2024
@user1823
Copy link
Contributor

user1823 commented Sep 29, 2024

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

@user1823
Copy link
Contributor

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
Copy link
Member Author

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

The previous version doesn't.

@user1823
Copy link
Contributor

The previous version doesn't.

It does filter them in the following lines:

fsrs4anki-helper/stats.py

Lines 389 to 392 in a459532

sum(case when lastIvl < %(i)d and ease = 1 and (type = 1 OR lastIvl <= -86400 OR lastIvl >= 1) then 1 else 0 end), /* flunked young */
sum(case when lastIvl < %(i)d and ease > 1 and (type = 1 OR lastIvl <= -86400 OR lastIvl >= 1) then 1 else 0 end), /* passed young */
sum(case when lastIvl >= %(i)d and ease = 1 and (type = 1 OR lastIvl <= -86400 OR lastIvl >= 1) then 1 else 0 end), /* flunked mature */
sum(case when lastIvl >= %(i)d and ease > 1 and (type = 1 OR lastIvl <= -86400 OR lastIvl >= 1) then 1 else 0 end), /* passed mature */

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

@L-M-Sherlock
Copy link
Member Author

It does filter them in the following lines:

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

@user1823
Copy link
Contributor

user1823 commented Sep 29, 2024

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 L-M-Sherlock merged commit b829bbe into main Sep 29, 2024
2 checks passed
@L-M-Sherlock L-M-Sherlock deleted the Fix/filter-out-manual-and-cram-reviews-in-true-retention branch September 29, 2024 10:07
@L-M-Sherlock
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants