Tabular Learner dynamic labelling

I am trying to set up a custom tabular dataset and want to compare competitors. I can get the inputs to work - randomly selecting a person from the same race but am lost as to how to make the target the difference between the targets of the two tensors. Should this be in collate or am I way of target?

class TabularList2(TabularList):    
def get(self, o):
    if not self.preprocessed: return self.inner_df.iloc[o] if hasattr(self, 'inner_df') else self.items[o]
    p_idx = self.inner_df[(self.inner_df.race_id == self.inner_df.loc[o,'race_id'])\

    codes = [] if is None else [[o],[p_idx]]
    conts = [] if self.conts is None else [self.conts[o],self.conts[p_idx]]
    return self._item_cls(codes, conts, self.classes, self.col_names)

Thanks for any assistance.