When running the following code:
exp = multifit1552_fp16()
dataset = Path(f'data/wiki/fa-2')
wiki_dataset = exp.arch.dataset(dataset)
wiki_dataset.load_lm_databunch(bs=128,bptt=70).show_batch()
exp.pretrain_lm.train_(wiki_dataset)
I got:
TypeError Traceback (most recent call last)
in ()
----> 1 exp.pretrain_lm.train_(wiki_dataset)
3 frames
/usr/lib/python3.6/pathlib.py in _parse_args(cls, args)
638 parts += a._parts
639 else:
–> 640 a = os.fspath(a)
641 if isinstance(a, str):
642 # Force-cast str subclasses to str (issue #21127)
TypeError: expected str, bytes or os.PathLike object, not ULMFiTDataset
So, what is wrong with the code? wiki_dataset seems to be a ULMFiTDataset. Then why the pathlib expect str?
This is a code from MultiFit github notebooks