Alex, thank you!
Yes, that’s right - the second script watches the training script and does whatever is required at the moment, which can be:

add new data to the buffer by going through the following steps:
1a) fetch new data
2a) transform this data (heavy computation)
3a) write this new transformed data to the buffer for the training script to consume
delete used data from the buffer to free space

Can PyTorch DataLoader do all of the above? Including step 2?