I’m trying to train bert with torchtext, but I got the following error:`
Traceback (most recent call last):
  File "C:/Users/BHAAK/Desktop/ML_PATH/dirty-hands/DL file/bert pro.py", line 215, in <module>
    big_training_loop(555, optimizer, model, criterion, train_iterator, valid_iterator, accuracy_score=accuracy_score)
  File "C:/Users/BHAAK/Desktop/ML_PATH/dirty-hands/DL file/bert pro.py", line 121, in big_training_loop
    for (text, labels), (val_text, val_labels) in zip(train_loader, val_loader):
  File "C:\Users\BHAAK\AppData\Local\Programs\Python\Python36\lib\site-packages\torchtext\data\iterator.py", line 141, in __iter__
    self.init_epoch()
  File "C:\Users\BHAAK\AppData\Local\Programs\Python\Python36\lib\site-packages\torchtext\data\iterator.py", line 117, in init_epoch
    self.create_batches()
  File "C:\Users\BHAAK\AppData\Local\Programs\Python\Python36\lib\site-packages\torchtext\data\iterator.py", line 245, in create_batches
    self.batches = batch(self.data(), self.batch_size,
  File "C:\Users\BHAAK\AppData\Local\Programs\Python\Python36\lib\site-packages\torchtext\data\iterator.py", line 102, in data
    xs = sorted(self.dataset, key=self.sort_key)
TypeError: '<' not supported between instances of 'Example' and 'Example'

Process finished with exit code 1

It’s probably from this section of my code:
`TEXT = data.Field(batch_first=True, use_vocab=False, tokenize=tokenize_and_cut, # include_lengths=True,
                  preprocessing=tokenizer.convert_tokens_to_ids, init_token=init_token_idx, eos_token=eos_token_idx,
                  pad_token=pad_token_idx, unk_token=unk_token_idx)

LABEL = data.LabelField(dtype=torch.float)

fields = [('text', TEXT), ('label', LABEL)]
train_data, test_data = data.TabularDataset('IMDB Dataset.csv', format='csv', skip_header=True, fields=fields).split()
TEXT.build_vocab(train_data)
LABEL.build_vocab(train_data)

BATCH_SIZE = 255

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

# I think its  from BucketIterator ?
train_iterator, valid_iterator = data.BucketIterator.splits(
    (train_data, test_data),
    batch_size=BATCH_SIZE,
    device=device)

any idea about the solution ?