Pull in FSRS fix for pretrain

This commit is contained in:
Damien Elmes 2023-12-28 18:15:44 +10:00
parent 3e5458b3db
commit b73c1c7f87
3 changed files with 7 additions and 7 deletions

2
Cargo.lock generated
View file

@ -1813,7 +1813,7 @@ dependencies = [
[[package]] [[package]]
name = "fsrs" name = "fsrs"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=f45f46bdba6625f03677eaeb039dd8a6ffcad688#f45f46bdba6625f03677eaeb039dd8a6ffcad688" source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=58ca25ed2bc4bb1dc376208bbcaed7f5a501b941#58ca25ed2bc4bb1dc376208bbcaed7f5a501b941"
dependencies = [ dependencies = [
"burn", "burn",
"itertools 0.12.0", "itertools 0.12.0",

View file

@ -36,7 +36,7 @@ rev = "184b2ca50ed39ca43da13f0b830a463861adb9ca"
[workspace.dependencies.fsrs] [workspace.dependencies.fsrs]
git = "https://github.com/open-spaced-repetition/fsrs-rs.git" git = "https://github.com/open-spaced-repetition/fsrs-rs.git"
rev = "f45f46bdba6625f03677eaeb039dd8a6ffcad688" rev = "58ca25ed2bc4bb1dc376208bbcaed7f5a501b941"
# path = "../../../fsrs-rs" # path = "../../../fsrs-rs"
[workspace.dependencies] [workspace.dependencies]

View file

@ -341,7 +341,7 @@ mod tests {
item.starting_state, item.starting_state,
Some(MemoryState { Some(MemoryState {
stability: 99.999954, stability: 99.999954,
difficulty: 4.966779, difficulty: 5.8158145
}) })
); );
let mut card = Card { let mut card = Card {
@ -352,8 +352,8 @@ mod tests {
assert_eq!( assert_eq!(
card.memory_state, card.memory_state,
Some(FsrsMemoryState { Some(FsrsMemoryState {
stability: 248.65475, stability: 248.65057,
difficulty: 4.9747725, difficulty: 5.782729
}) })
); );
// but if there's only a single revlog entry, we'll fall back on current card // but if there's only a single revlog entry, we'll fall back on current card
@ -377,7 +377,7 @@ mod tests {
card.memory_state, card.memory_state,
Some(FsrsMemoryState { Some(FsrsMemoryState {
stability: 122.99994, stability: 122.99994,
difficulty: 6.859577 difficulty: 7.4459267
}) })
); );
Ok(()) Ok(())
@ -401,7 +401,7 @@ mod tests {
Some( Some(
MemoryState { MemoryState {
stability: 99.999954, stability: 99.999954,
difficulty: 9.793356 difficulty: 9.963163
} }
.into() .into()
) )