InputExample - list index out of range error
I am trying to train aSentence Transformers modelas explainedhere:my_dataset = Dataset.from_pandas(df)

n_samples = my_dataset.num_rows
train_examples = [InputExample(texts=my_dataset[i]['text'], label=my_dataset[i]['labels']) for i in range(n_samples)]

my_loader = DataLoader(train_examples, batch_size=BS, shuffle=True)
model.fit(train_objectives=[(my_loader, losses.BatchHardTripletLoss(model=model))], epochs=3)When I run the above code, I get this error:IndexError: list index out of rangeI have checked that thetextandlabelfield of the dataset have the same number of elements.I suppose that the error concernsInputExample, but I am not sure about it.