Loading a saved LMDataBunch under v.1.0.53

Consider the following snippet:

data_lm = TextLMDataBunch.from_folder(data_path, tokenizer=tokenizer)
data_lm.save()

How do I load this data_lm object again?

What have I tried?

  • fastai docs for datablock but could not spot this. I am probably looking in the wrong spot
  • Some not-so-smart syntax hacks like TextLMDataBunch.load(".")


I believe this is what you’re looking for, I stole this from https://github.com/fastai/fastai/blob/master/examples/ULMFit.ipynb

1 Like

That sounds about right, thanks!