It is possible to partially iterate over torch.utils.data.DataLoader. Below is a small snippet of code where the training data is iterated over until some condition is met. Finally, the validation data is iterated over until another condition is met. During each iteration of the outer loop, trainloader and valloader will continue from where they left off in the previous loop.
If you were using multiple datasets, you could change the condition to account for the proportion you want, fill some buffers with your data, and then act on the buffered data.
for i in range(N):
    for data_idx, data in enumerate(trainloader):
        DO SOMETHING
        if CONDITION:
            break

    for data_idx, data in enumerate(valloader):
        DO SOMETHING
        if CONDITION:
            break