No. The custom or internal sampler will create the indices and pass them to the Dataset.
batch_idx is created by your enumerate call and will assign an increasing index to each batch, which usually contains more than a single sample.