courses icon indicating copy to clipboard operation
courses copied to clipboard

LanguageModelData not defined

Open alibaltschun opened this issue 6 years ago • 11 comments

hello, i was following the tutorial. and in this code give me an error

trn_dl = LanguageModelLoader(pd.DataFrame(trn_lm,columns=['x']), bs, bptt)
val_dl = LanguageModelLoader(pd.DataFrame(trn_lm,columns=['x']), bs, bptt)
md = LanguageModelData(PATH_MODELS, 1, vs, trn_dl, val_dl, bs=bs, bptt=bptt)

NameError: name 'LanguageModelData' is not defined

i was check on this file and there are no class 'LanguageModelData' . and on this doc at 'Language Model Data' at the bottom say 'This is all done internally when we use TextLMDataBunch, by creating DataLoader using the following class:'

its that mean the class LanguageModelData was refactored to TextLMDataBunch ?

i will used fastai for production so i used the new version of fastai. so how to fix that problem with the new version of fastai?

thanks

alibaltschun avatar Nov 14 '18 04:11 alibaltschun

I have the same problem

SkullFang avatar Jan 08 '19 07:01 SkullFang

if you using v1. just only read the documentation of fastai v1, dont see the course/tutorial with v0.6 that make us confused. that my problem while first time using fastai.

alibaltschun avatar Jan 08 '19 14:01 alibaltschun

if you using v1. just only read the documentation of fastai v1, dont see the course/tutorial with v0.6 that make us confused. that my problem while first time using fastai.

So, does this method exist in version 0.6 or in version 1.0? Which version should I choose? How did you solve it? I find coursev3, but no video. Thanks a lot.

SkullFang avatar Jan 09 '19 03:01 SkullFang

that the code for v.0.6

take the v.1 read the documentation wait for the course v3

alibaltschun avatar Jan 09 '19 03:01 alibaltschun

So, what's the equivalent of LanguageModelData in V.1?

frannievas avatar Feb 15 '19 01:02 frannievas

forget about it, just read the documentation v.1 if you read v.06 code and used v1 you will be confused better if you forget all about v.06 and learn from the beginning with v.1

alibaltschun avatar Feb 15 '19 04:02 alibaltschun

@alibaltschun Ok thanks. Any link to a tutorial of V.1?

frannievas avatar Feb 15 '19 15:02 frannievas

@frannievas hope you will find this useful: https://github.com/fastai/fastai/blob/release-1.0.60/courses/00-DO-NOT-USE-WITH-FASTAI-1.0.x.txt

zsquaredz avatar Feb 21 '20 23:02 zsquaredz

@zsquaredz Thanks!

frannievas avatar Feb 22 '20 16:02 frannievas

@frannievas , did you resolve the issue?. I am stuck in finding alternative of LanguageModelData

brij1823 avatar Oct 30 '21 00:10 brij1823

@brij1823 In the end, I ended up using the newest version of FastAI and following the new courses/tutorials

frannievas avatar Nov 01 '21 12:11 frannievas