Backwards attributes not found in NLP text/learner

I am using version: 1.0.56.dev0 and Pytorch version: 1.1.0, python 3.6.8, and I got this error:

/usr/local/lib/python3.6/dist-packages/fastai/text/ in language_model_learner(data, arch, config, drop_mult, pretrained, pretrained_fnames, **learn_kwargs)
205 meta = _model_meta[arch]
206 learn = LanguageLearner(data, model, split_func=meta[‘split_lm’], **learn_kwargs)
–> 207 url = ‘url_bwd’ if data.backwards else ‘url’
208 if pretrained or pretrained_fnames:
209 if pretrained_fnames is not None:

/usr/local/lib/python3.6/dist-packages/fastai/ in getattr(self, k)
120 return cls(*dls, path=path, device=device, dl_tfms=dl_tfms, collate_fn=collate_fn, no_check=no_check)
–> 122 def getattr(self,k:int)->Any: return getattr(self.train_dl, k)
123 def setstate(self,data:Any): self.dict.update(data)

/usr/local/lib/python3.6/dist-packages/fastai/ in getattr(self, k)
37 def len(self)->int: return len(self.dl)
—> 38 def getattr(self,k:str)->Any: return getattr(self.dl, k)
39 def setstate(self,data:Any): self.dict.update(data)

/usr/local/lib/python3.6/dist-packages/fastai/ in DataLoader___getattr__(dl, k)
18 = intercept_args
—> 20 def DataLoader___getattr__(dl, k:str)->Any: return getattr(dl.dataset, k)
21 DataLoader.getattr = DataLoader___getattr__

/usr/local/lib/python3.6/dist-packages/fastai/ in getattr(self, k)
638 res = getattr(y, k, None)
639 if res is not None: return res
–> 640 raise AttributeError(k)
642 def setstate(self,data:Any): self.dict.update(data)

AttributeError: backwards

Any help?

A little more info please. :smile:

Is this in one of the part 1 notebooks? If so, could you tell me which one so I can take a look at it? If it is custom code, could you post all of it?


It’s my own NLP notebooks, using the course as a guideline, and I forgot to check the data-bunch type, I mistakenly create a “TextClasDataBunch” instead of “TextMLDataBunch”.

It’s all good. thanks

Ops, “TextLMDataBunch”

Same here.
Have you found a solution?