-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Clear memory states during bulk action if item is None #3717
base: main
Are you sure you want to change the base?
Conversation
I just noticed that the FSRS Helper add-on uses Basically, the goal is that the card should get memory state when item is None only during reviewing. In all other conditions, the memory state should not be calculated if item is None. |
Does the problem mentioned in https://forums.ankiweb.net/t/suggestion-copy-card-debug-info-button/54206/10 still exist after #3634? @Luc-Mcgrady, could you help me confirm it? |
What happens if you
With and without this change |
Something doesn't look right. With the changes in this PR, I expected the card to have no memory states and interval to be the same as that before rescheduling. Just to confirm, did you use Anki's "Reschedule cards on change" and not the helper add-on's rescheduling feature? In case you are wondering why the interval should not change after rescheduling, here is the reason: The goal of this PR is not to fix the intervals. It is to prevent them from becoming too high or too low by repeated rescheduling in cases where item is None. To simulate a case with item = None, I asked you to set a future ignore date. To fix the intervals when they have already increased, we need to fix the root cause. In your case, it requires setting the ignore before date correctly. |
Yes I did use reschedule cards on change changing the value slightly as you asked. |
You are right, it doesn't matter. But, I don't know how to build from source code. So, some help in testing would be appreciated. Also see edits to my comment above. |
[rslib/src/scheduler/fsrs/memory_state.rs:84:13] &items[0] = (
CardId(
1662864375170,
),
Some(
FsrsItemForMemoryState {
item: FSRSItem {
reviews: [
FSRSReview {
rating: 2,
delta_t: 0,
},
// ...
FSRSReview {
rating: 3,
delta_t: 63,
},
],
},
starting_state: Some(
MemoryState {
stability: 0.9999996,
difficulty: 2.0842972,
},
),
},
),
)
[rslib/src/scheduler/fsrs/memory_state.rs:84:13] ignore_before = TimestampMillis(
1741824000000,
) ignore reviews before doesn't empty the revlogs while not re-training. Is not being able to build from source something I can help with? |
That seems to be a bug (provided that the ignore before date is in future).
I never really tried to set that up. Thanks for the offer, but let me try first. |
The latest changes try to fix the issue you highlighted (ignore reviews before doesn't empty the revlogs while not re-training if ignore before date is set to a future date.) The test failure is not related to my changes. Can you please test this again? I didn't succeed building Anki from source code. It was showing some network error. I will try again later. |
This comment was marked as outdated.
This comment was marked as outdated.
It actually might be, but I really don't understand why. In this test, how can my changes cause the item to be None? @L-M-Sherlock, sorry for disturbing but your help will be appreciated. anki/rslib/src/scheduler/fsrs/memory_state.rs Lines 387 to 411 in 39e293b
|
its because the revlogs ID is 0 |
But, how can that be? The following should set it to be 100 days before today. revlog(RevlogReviewKind::Review, 100) |
// params.rs line 432
const NEXT_DAY_AT: TimestampSecs = TimestampSecs(86400 * 100); the revlogs id's are based on 100 days in the future, just put an extra 0 on there |
Thanks Luc for all the help in debugging and testing. @dae, this is ready for a final review now. |
Prevents issues like https://forums.ankiweb.net/t/suggestion-copy-card-debug-info-button/54206/10 and #3634
If item is None, the previous code uses the card state to infer memory states, which leads to a vicious cycle that keeps changing the memory states at every reschedule if desired retention and historical retention are not the same.
@L-M-Sherlock, WDYT?