It seems that there is a miss understanding somewhere about the question Im trying to get answered.
What I don’t know is how to update my existing dataloader(s) with new data to get them the exact same way as during training.
The learner don’t have the labels for the new data. So I need to either give the test_dl new labels together with new files somehow OR create a new dataloader as based on the existing dataloades with new items with both new filenames and new labels.
You need to pass the files in as though they were labelled in the same way based on the transforms, what I’ve stated multiple times.
If you want to have this occur during training as a new validation dataloader you need to set learn.dls.valid = test_dl
To get labeled data you need to pass in the same setup for inputs your DataBlock received (or however you made the dataloaders), (so if you did get_image_files, it would be a filename for instance) and fastai will apply the pipeline transforms on these inputs based on the validation transforms to create a new dataloader based on them. You then need to pass in with_labels=True to the creation of the test_dl:
You shouldn’t need/nor want to normally update the existing dataloaders. What you do is make a new dataloader based on the old ones and how they are setup. DataLoaders when doing learn.export do not retain the data, just the transforms which is how the data is processed
sorry for the confusion, This line solved it for me.
test_dl = learn.dls.test_dl(df, with_labels=True)
I interpreted your answer as something else… first create a dataloader using the dataframe for the training data and then create the test_dl using only the list of file-paths (as shown in the examples above) or as a pandas Series, stated in the error message.