-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix/FSRS simulator fallback to memory_state_from_sm2 for after setting “Ignore cards reviewed before” #4187
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
The head ref may contain hidden characters: "Fix/FSRS-simulator-fallback-to-memory_state_from_sm2-for-after-setting-\u201CIgnore-cards-reviewed-before\u201D"
Conversation
…g “Ignore cards reviewed before”
|
@user1823 I found that the change introduced in PR #3717 caused this problem. Due to Fine. I figure it out. If I revert the change on |
| let new_cards = | ||
| cards.iter().filter(|c| c.queue == CardQueue::New).count() + req.deck_size as usize; | ||
| let fsrs = FSRS::new(Some(&req.params))?; | ||
| let historical_retention = req.desired_retention; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a placeholder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved in d159aaa
…ted logic - Added `historical_retention` field to `SimulateFsrsReviewRequest` in `scheduler.proto`. - Updated `simulator.rs` to use `req.historical_retention` instead of the removed `desired_retention`. - Modified `FsrsOptions.svelte` to include `historicalRetention` in the options passed to the component.
|
Could you rename the branch? GitHub is throwing up a warning. The head ref may contain hidden characters: "Fix/FSRS-simulator-fallback-to-memory_state_from_sm2-for-after-setting-\u201CIgnore-cards-reviewed-before\u201D" |
Yes. To prevent that issue, I made it so that the memory states of cards without any revlog are calculated only in the reviewer. |
I've tried to rename a branch assosiated with a pr before and it closed the PR, so we will need a second pr. Just a heads up. |
|
Thats ok with me. Moving forward, if you could keep the branch names not-too-long @L-M-Sherlock, that'd be appreciated :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions. Otherwise, LGTM.
| .filter_map(|c| { | ||
| let memory_state = match c.memory_state { | ||
| Some(state) => state, | ||
| None => fsrs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we exclude new cards here to improve performance and prevent introduction of new bugs?
Edit: filter(is_included_card) already excludes the new cards. I got confused by CardQueue::New => None, in the convert function. That's not actually needed, IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got confused by
CardQueue::New => None,in theconvertfunction. That's not actually needed, IMO.
It's required by Rust's compiler.
Co-authored-by: user1823 <[email protected]>
Co-authored-by: user1823 <[email protected]>
Co-authored-by: user1823 <[email protected]>
source: https://forums.ankiweb.net/t/strange-fsrs-simulator-result-after-setting-ignore-cards-reviewed-before/59876
It's a following patch for #3940