Adding test to data

data = (SegmentationItemList.from_folder(path=path/‘train’)
.split_by_rand_pct(0.2)
.label_from_func(get_y_fn, classes=[0, 1])
.add_test((path/‘test’).ls(), label=None)
.transform(size=224, tfm_y=True)
.databunch(path=Path(’.’), bs=8)
.normalize(imagenet_stats))

I am trying to implement the aforementioned code and it gives the error:
Exception: Attempting to apply transforms to an empty label. This usually means you are
trying to apply transforms on your xs and ys on an inference problem, which will give you wrong
predictions. Pass tfms=None, tfm_y=False when creating your test set.

which further gave another exception:
Exception: It’s not possible to apply those transforms to your dataset:
Attempting to apply transforms to an empty label. This usually means you are
trying to apply transforms on your xs and ys on an inference problem, which will give you wrong
predictions. Pass tfms=None, tfm_y=False when creating your test set.

i just can’t figure out what’s going wrong. can someone please help me out?