AttributeError: 'PosixPath' object has no attribute 'iloc' when calling `ImageList.from_df`

I want to do inference on a model that I trained and exported with learn.export

learn = load_learner(path, 'multiclass_model.pkl', test=ImageList.from_df(path, df))

I am getting AttributeError: 'PosixPath' object has no attribute 'iloc'

Ah, silly mistake, this gets fixed by switching

ImageList.from_df(path, df)

to

ImageList.from_df(df, path)