Skip to content
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

Integrate into Anki #27

Closed
dae opened this issue Aug 24, 2023 · 9 comments · Fixed by #53
Closed

Integrate into Anki #27

dae opened this issue Aug 24, 2023 · 9 comments · Fixed by #53

Comments

@dae
Copy link
Collaborator

dae commented Aug 24, 2023

Edit: new PR is here: ankitects/anki#2633

@asukaminato0721
Copy link
Collaborator

Will investigate once burn-rs/burn#690 is merged

merged.

@dae
Copy link
Collaborator Author

dae commented Aug 26, 2023

That PR didn't quite do what I'd hoped - it still displays progress on the console, and does not seem to expose individual item counts (only the epoch changes). It looks like it may be possible to achieve the desired result by building our own learner though - will investigate further.

@dae
Copy link
Collaborator Author

dae commented Aug 30, 2023

I have a very rough draft implemented, that will print the weights but not integrate them in the collection. Burn-rs currently includes a number of dependencies that are quite old and have security issues, and those will need to be addressed before I can proceed further.

recording.mp4

@L-M-Sherlock
Copy link
Member

Awesome work!

What's the next step? Would you like to integrate the scheduler part into Anki, or still let users use custom scheduling?

@dae
Copy link
Collaborator Author

dae commented Aug 30, 2023

First priority is getting the licenses and old dependencies sorted out. After that, I'll need to test this prototype and make sure it can be compiled/run across the different platforms. Assuming that's all ok, once you feel the weight generation of this crate is not lacking compared to the Python optimizer, it should be ok to include in Anki. To start with, users would continue to use custom scheduling, but the next logical step would be to integrate the reviewing part of FSRS into the Rust code as well.

@dae
Copy link
Collaborator Author

dae commented Sep 2, 2023

I've got #48 hooked up. Still waiting on a few more PRs to burn-rs to be approved.

output.mp4

@L-M-Sherlock
Copy link
Member

Advice for the calculation of optimal retention:

image

Constraint of range for the input values could avoid some weird result. Here is my code in the gradio app:

            with gr.Column():
                weights = Textbox(label="Weights", lines=1,
                                  value="0.4, 0.6, 2.4, 5.8, 4.93, 0.94, 0.86, 0.01, 1.49, 0.14, 0.94, 2.18, 0.05, 0.34, 1.26, 0.29, 2.61")
                learning_time = Slider(label="Learning Time perday (minutes)",
                                       minimum=5, maximum=1440, step=5, value=30)
                learn_span = Slider(label="Learning Period (days)", minimum=30,
                                    maximum=3650, step=10, value=365)
                deck_size = Slider(label="Deck Size (cards)", minimum=100,
                                   maximum=100000, step=100, value=10000)
            with gr.Column():
                max_ivl = Slider(label="Maximum Interval (days)", minimum=30,
                                 maximum=36500, step=10, value=36500)
                recall_cost = Slider(label="Review Cost (seconds)", minimum=1,
                                     maximum=600, step=1, value=10)
                forget_cost = Slider(label="Relearn Cost (seconds)",
                                     minimum=1, maximum=600, step=1, value=30)
                learn_cost = Slider(label="Learn Cost (seconds)", minimum=1,
                                    maximum=600, step=1, value=10)

@dae
Copy link
Collaborator Author

dae commented Sep 2, 2023

That of course makes sense, but I'm focusing on the basic functionality at the moment - polish can come later :-)

@dae
Copy link
Collaborator Author

dae commented Sep 3, 2023

You can now play with this on ankitects/anki#2633

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants