Skip to content

Commit

Permalink
Fix panic when training interrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Oct 13, 2023
1 parent 5089470 commit 1d0ca1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/training.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ impl<B: Backend> FSRS<B> {
self.device(),
progress.clone().map(ProgressCollector::new),
);
model.unwrap().w.val().to_data().convert().value
Ok(model?.w.val().to_data().convert().value)
})
.collect();
.collect::<Result<_>>()?;

let average_weights = weights_sets
.iter()
Expand Down

0 comments on commit 1d0ca1a

Please sign in to comment.