mirror of
https://github.com/ankitects/anki.git
synced 2026-01-14 06:23:57 -05:00
* Support searching for deck configs by name * Integrate FSRS optimizer into Anki * Hack in a rough implementation of evaluate_weights() * Interrupt calculation if user closes dialog * Fix interrupted error check * log_loss/rmse * Update to latest fsrs commit; add progress info to weight evaluation * Fix progress not appearing when pretrain takes a while * Update to latest commit
20 lines
627 B
Rust
20 lines
627 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
use fsrs_optimizer::FSRSError;
|
|
|
|
use crate::error::AnkiError;
|
|
use crate::error::InvalidInputError;
|
|
|
|
impl From<FSRSError> for AnkiError {
|
|
fn from(err: FSRSError) -> Self {
|
|
match err {
|
|
FSRSError::NotEnoughData => InvalidInputError {
|
|
message: "Not enough data available".to_string(),
|
|
source: None,
|
|
backtrace: None,
|
|
}
|
|
.into(),
|
|
FSRSError::Interrupted => AnkiError::Interrupted,
|
|
}
|
|
}
|
|
}
|