ValueError with Trainer

Getting the following error when running trainer.train()

ValueError: You have to specify either input_ids or inputs_embeds

Here is my trainer

trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_test_valid_dataset[“train”],
eval_dataset=train_test_valid_dataset[“test”],
compute_metrics=compute_metrics
)

Using the AutoTkenizer

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(“distilbert-base-uncased”)

def tokenize_function(examples):
return tokenizer(examples[“title”], padding=“max_length”, truncation=True)

tokenized_datasets = train_test_valid_dataset.map(tokenize_function, batched=True)

Can someone help out here ?