Using dataset that is updated with each iteration

I had a specific use-case wherein I will continuously update the dataset by adding certain data points based on the results of each iteration of training.

Can I do this dataset update using DataLoaders/Datasets/Samplers? Is there any other convenient functionality available? What would you all recommend? (one way I thought of is to maintain a python 4D list and update it each time, while passing this list as input to the neural network - however I feel like there should be a more elegant solution)

Are these updates performed on at a specific time? I.e. after each epoch?

Yes, after each epoch.

Well you could simply write a dataset that basically holds only a list (and append the data to that list), but you would have to reinstantiate the dataloader.