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

[BUG] Index out of bounds in optimizer #123

Closed
Blauelf opened this issue Jan 28, 2023 · 3 comments · Fixed by #124
Closed

[BUG] Index out of bounds in optimizer #123

Blauelf opened this issue Jan 28, 2023 · 3 comments · Fixed by #124
Labels
bug Something isn't working

Comments

@Blauelf
Copy link

Blauelf commented Jan 28, 2023

Describe the bug
Once I reach the "Calculate the optimal retention to minimize the repetitions for long-term memory consolidation.", the next block crashes at the end of execution

To Reproduce
Steps to reproduce the behavior:

  1. Load my data
  2. Follow all the steps in the notebook

Expected behavior
No error message (obviously). Some graph at the end.

Screenshots

IndexError                                Traceback (most recent call last)
[<ipython-input-13-e7c94e47fd97>](https://localhost:8080/#) in <module>
     58                 forget_s_index = max(stability2index(forget_s), 0)
     59                 recall_repetitions = repetitions_list[d - 1][recall_s_index] + r_repetitions
---> 60                 forget_repetitions = repetitions_list[forget_d - 1][forget_s_index] + f_repetitions
     61                 exp_repetitions = p_recall * recall_repetitions + (1.0 - p_recall) * forget_repetitions
     62                 if exp_repetitions < repetitions_list[d - 1][s_index]:

IndexError: index 801 is out of bounds for axis 0 with size 800

Environment

  • Anki version: (2.1.56)
  • OS: (Windows)
  • Scheduler version: (v3.9.6 Qt6)
  • Optimizer version: v3.9.10
  • Simulator version: (v3.8.3)

Additional context

@Blauelf Blauelf added the bug Something isn't working label Jan 28, 2023
@L-M-Sherlock
Copy link
Member

What are the parameters generated by the optimizer for you? I need them to solve related problems.

@Blauelf
Copy link
Author

Blauelf commented Jan 28, 2023

Do you mean the w vector?

var w = [0.826, 1.4373, 4.5608, -0.868, -1.2271, 0.0, 1.7429, -0.1494, 1.0813, 1.6569, -0.5394, 0.9351, 1.1447];

@L-M-Sherlock L-M-Sherlock linked a pull request Jan 28, 2023 that will close this issue
@L-M-Sherlock
Copy link
Member

https://github.com/open-spaced-repetition/fsrs4anki/blob/v3.10.1/fsrs4anki_optimizer.ipynb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants