ULMFIT :- Language_model_learner() missing 1 required positional argument: 'arch'

I was able to run this code
learn = language_model_learner(data_lm, pretrained_model=URLs.WT103_1, drop_mult=0.5) until yesterday but today morning i see the following error.
language_model_learner() missing 1 required positional argument: ‘arch’.
I suspect there is some issue with the source code.

1 Like

Did you recently update the fastai version? In release 1.0.43 there was a breaking change, ‘arch’ was added. You should be able to add “arch=AWD_LSTM” to your code to fix the issue.

1.0.43 (2019-02-11)

Breaking change:

  • language_model_learner and text_classifier_learner have a different syntax: (data, arch, pretrained=True,...) to mimic the behaivor of create_cnn