Hi, the error stack trace indicates a key error.
Look at your method:

def getitem (self, idx):
—> 12 return self.X1[idx], self.X2[idx], self.y[idx]

Print length(if applicable) and contents of  idx, self.X1, self.X2,  self.y.
The error surely lays there.
Hope it helps.