NameError: name 'LanguageModelData' is not defined
ssurananitish opened this issue · comments
Hi, I am trying to do run this set of notebooks that are provided. I was able to preprocess the data successfully, but when I try to run the third notebook : "3 - Train Language Model Using FastAI", I get the following error: -
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-11-a18631c71446> in <module>
12 cycle_mult=2,
13 bs = 32,
---> 14 wd = 1e-6)
15
16 elif use_cache:
D:\code_search-github\lang_model_utils.py in train_lang_model(model_path, trn_indexed, val_indexed, vocab_size, lr, n_cycle, cycle_len, cycle_mult, em_sz, nh, nl, bptt, wd, bs)
191
192 # create lang model data
--> 193 md = LanguageModelData(mpath, 1, vocab_size, trn_dl, val_dl, bs=bs, bptt=bptt)
194
195 # build learner
NameError: name 'LanguageModelData' is not defined
In one of the issues at the FastAI repository I read that 'LanguageModelData' was replaced by 'TextLMDataBunch'. I have tried using that but didn't get any success.
How should I proceed forward so that I can run this notebook properly?
Python-Version - 3.6.8
Cuda-Version - 10.0
FastAI-Version - 1.0
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.80. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Try uninstalling your fastai library and use the one provided in this repository.
Yes, @ssurananitish you are using a different version of pytorch which is causing problems. Please use the one in this repository