Probably you are missing some import statement. tfms_from_model function is declared in transforms.py: https://github.com/fastai/fastai/blob/master/fastai/transforms.py
Dataset loader assumes that there is a “test” folder inside the dataset path. That folder should contain images for the test set.