Great! I tried running it in Google Colab, I uploaded my collection.colpkg
file to My Drive/Colab Notebooks
in Google Drive. Then I needed to modify the notebook
# Mount Google Drive
from google.colab import drive
drive.mount('/content/drive')
filename = "/content/drive/My Drive/Colab Notebooks/collection.colpkg"
# If you upload deck file, replace it with your deck filename. E.g., ALL__Learnig.apkg
# If you upload collection file, replace it with your colpgk filename. E.g., collection-2022-09-18@13-21-58.colpkg
...
for it to load my collection.
Building the trainset took about 5 minutes in Google Colab (I didn’t enable GPU acceleration in Google Colab). EDIT: I tried enabling GPU acceleration and it took 4 minutes.
100%|██████████| 24177/24177 [05:16<00:00, 76.43it/s]
Trainset saved
However, when I go to train the model, it seems like I get NaN
for the parameters after 30981
iterations:
iteration: 1
f_s: Parameter containing:
tensor([1.9999], requires_grad=True)
f_d: Parameter containing:
tensor([4.9999], requires_grad=True)
s_w: Parameter containing:
tensor([ 3.0001, -0.6999, -0.1999, -0.2999], requires_grad=True)
iteration: 30981
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 61961
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 92941
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 123921
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 154901
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 185881
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 216861
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 247841
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 278821
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
iteration: 309801
f_s: Parameter containing:
tensor([nan], requires_grad=True)
f_d: Parameter containing:
tensor([nan], requires_grad=True)
s_w: Parameter containing:
tensor([nan, nan, nan, nan], requires_grad=True)
Training finished!
The training took about 41 minutes on Google Colab (no GPU acceleration). EDIT: I tried enabling GPU acceleration and it took about 33 minutes.
Then I run the print commands:
const defaultDifficulty = nan;
const defaultStability = nan;
const difficultyDecay = nan;
const stabilityDecay = nan;
const increaseFactor = nan;
const lapsesBase = nan;
It seems something went wrong during the training, all the values are nan
I have uploaded my Anki collection here (media files removed): 23.06 MB file on MEGA
Also, I noticed you have recently changed the default increaseFactor
from 60
to 3
. Just curious as to why this was changed. In fsrs.js it is set to 60
still