bump fsrs-rs

This commit is contained in:
Luc Mcgrady 2025-05-23 11:01:39 +01:00
parent c0cd197cac
commit 4b70930d46
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
3 changed files with 10 additions and 5 deletions

2
Cargo.lock generated
View file

@ -2295,7 +2295,7 @@ dependencies = [
[[package]]
name = "fsrs"
version = "4.0.0"
source = "git+https://github.com/Luc-Mcgrady/fsrs-optimizer-burn.git?rev=fe6af1d33a2edb33dd8a50d87742e60e6a51de01#fe6af1d33a2edb33dd8a50d87742e60e6a51de01"
source = "git+https://github.com/open-spaced-repetition/fsrs-rs.git?rev=0aa238a7e0daa26ffc66596e508a818d504bb5df#0aa238a7e0daa26ffc66596e508a818d504bb5df"
dependencies = [
"burn",
"itertools 0.14.0",

View file

@ -36,8 +36,8 @@ rev = "184b2ca50ed39ca43da13f0b830a463861adb9ca"
[workspace.dependencies.fsrs]
# version = "3.0.0"
git = "https://github.com/Luc-Mcgrady/fsrs-optimizer-burn.git"
rev = "fe6af1d33a2edb33dd8a50d87742e60e6a51de01"
git = "https://github.com/open-spaced-repetition/fsrs-rs.git"
rev = "0aa238a7e0daa26ffc66596e508a818d504bb5df"
# path = "../open-spaced-repetition/fsrs-rs"
[workspace.dependencies]

View file

@ -103,8 +103,13 @@ impl crate::services::DeckConfigService for Collection {
) -> Result<anki_proto::deck_config::GetRetentionWorkloadResponse> {
const LEARN_SPAN: usize = 1000;
let before = fsrs::expected_workload(&input.w, input.before, LEARN_SPAN)?;
let after = fsrs::expected_workload(&input.w, input.after, LEARN_SPAN)?;
const PASS_COST: f32 = 7.;
const FAIL_COST: f32 = 23.;
let before =
fsrs::expected_workload(&input.w, input.before, LEARN_SPAN, PASS_COST, FAIL_COST)?;
let after =
fsrs::expected_workload(&input.w, input.after, LEARN_SPAN, PASS_COST, FAIL_COST)?;
Ok(anki_proto::deck_config::GetRetentionWorkloadResponse {
factor: after / before,