So, I think I have the class working correctly…

class roofDataset(Dataset):
‘’’
roof data class
'''
def __init__(self, csv_file, transform = None):
    '''
    Args:
        csv_file (string): Path to the csv file with annotations.
        transform (callable, optional): Optional transform to be applied
            on a sample.
    '''
    self.roof_frame = pd.read_csv(csv_file)
    self.transform = transform
    
def __len__(self):
    return len(self.roof_frame)

def __getitem__(self, idx):
    if torch.is_tensor(idx):
        idx = idx.tolist()
     
    root_dir = self.roof_frame.iloc[idx,4]
    pic = self.roof_frame.iloc[idx, 1]
    label = self.roof_frame.iloc[idx, 3]
    img_name = os.path.join(root_dir, pic)
    image = Image.open(img_name)
    policy = self.roof_frame.iloc[idx, 0]
    sample = {'image': image, 'policy': policy, 'label':label}

    if self.transform:
        image = self.transform(image)

    return image, label, policy


So this returns the image, the label and the policy which is the ID I was referring to.  I’ve made modifications to the tutorial and got everything to print as expected with no errors!
I’m not sure how I’ll now feed this into an auto encoder but, the first step is done!  Thanks for the hints.