thanks, I just looked at linked issue, and agree that it is exactly what I was looking for.  It looks like it is not ready yet.  so here is what I will use in the meantime …
def __iter__(self):
    # deterministically shuffle based on epoch
    g = torch.Generator()
    g.manual_seed(self.epoch)
    if self.shuffle:
        indices = torch.randperm(len(self.dataset), generator=g).tolist()
    else:
        indices = list(range(len(self.dataset)))

    # add extra samples to make it evenly divisible
    indices += indices[:(self.total_size - len(indices))]
    assert len(indices) == self.total_size

    # subsample
    indices = indices[self.rank:self.total_size:self.num_replicas]
    assert len(indices) == self.num_samples

    # get targets (you can alternatively pass them in __init__, if this op is expensive)
    targets = self.dataset.targets
    # select only the wanted targets for this subsample
    targets = torch.tensor(targets)[indices]
    assert len(targets) == self.num_samples
    # randomly sample this subset, producing balanced classes
    weights = self.calculate_weights(targets)
    subsample_balanced_indicies = torch.multinomial(weights, self.num_samples, self.replacement)
    # now map these target indicies back to the original dataset index...
    dataset_indices = torch.tensor(indices)[subsample_balanced_indicies]

    return iter(dataset_indices.tolist())