-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feat/Inbuilt optimizer #91
Conversation
+ name to temp file
1 error
Thanks for the feedback! As for the Python problems, Sherlock plans to re-write the optimizer in rust so it can be included without worrying about messing up the lib folder. |
I got this error while attempting to install the local optimizer, probably a pip thing, but thought I'd report it anyway EDIT: running anki in administrator mode appeared to fix it |
I tried to optimize a deck with a single new card in it [for testing color fonts] and it gets stuck in an optimizing state so I can't optimize a different deck. anki-console.bat says it's stopped, the gui says it's still going. Also happens with a completely empty deck.
|
I'm afraid you cant optimize a deck which doesnt have a reasonably substantial review history. 1 new card doesnt give it any reviews to work with hence the "No review log found!" error. It shouldn't block you from optimizing after an error though so i'll have a look at that. |
Does this work for Mac now? If not, I might try to figure it out. |
It should I think. |
I'm closing this pull request because of the new, native FSRS support with Anki version 23.10 . |
This allows you to quickly optimize your decks in anki without having to worry about exporting them or google colab and whatnot.
The intended flow is:
1.Fsrs -> Install local optimizer
This installs the fsrs4anki_optimizer module to the lib folder in anki or just to python on linux.
This uses pip as per the warning and for now also uses git.
Look at The install function.
If any part of this code is not going to work for whatever reason its going to be this function.
I have tested it once on both linux and windows. The install on windows seems really slow and lacks a good progress bar but but after like 10 minuites it works so thats a problem for another day.
As a note I personally get a load of error popups when doing this on windows that look like this.
If you just keep hitting the ok button it works in the end. You might not have this issue as I suspect that this is to do with my pip version and ankis python version not being compatilble.
So uhh good luck!
2.Cog Button -> Optimize
I've found that windows reports non responsiveness here sometimes because the torch library just takes that long to load
3.Prompt for optimal retention.
Defaults to no.
No meaning that it wont calculate optimal retention as opposed to cancel which exits without optimizing anything. might be a bit ambiguous and confusing if your not already familliar with the scheduler?
4.Loading tooltip
(The total value for the optimal retention is broken for some reason but it works so I left it)
5.Copyable results
This is the screen that lets the user copy what the results are. This screen can also be accessed in Tools -> fsrs4anki -> show saved optimized settings
You could potentially include the optimization code itself here making it easier to ctrl-a ctrl-v into the custom scheduling options but that would lead to a massive popup and mean somehow fetching fsrs4anki_scheduler.js or maybe adding the main repo as a submodule of the helper?
6.Manual edit
You can optionally then go to the addons config and edit the values manually
Testing Advice
I do think however that the install part of the program using pip and git is a bit unreliable. Maybe take a backup of the lib folder in your anki installation if you're testing it on windows so you can easily reset and if your on linux or mac or whatever make sure the fsrs4anki_optimizer module isnt pre-installed.
As a side note I really despise the code I wrote here to get the progress bar tooltip working as I essensially just replaced tqdm's functions with my own. I feel like theres a better way that would mean changing the code in the Optimizer class but as long as it works I guess.