Hello,
I know it has been along time since this post.
It has been days since I tried to find a solution to find a better hyperparameters for my model. I tried many solutions but with no good results 
I am working with your proposed solution here with a classification bert model developed under the Pytorch lightning. I couldn’t find what to put in the fit method. i tried a tensor dataloader but It doesn’t work so I tried the result of the tokeniser like this :
input_ids_train = encoded_data_train['input_ids'] # Xs of my models
labels_train = torch.tensor(label.values) # the labels of my data

I got a TypeError: forward() missing 1 required positional argument: 'attention_mask' and a FitFailedWarning said that I need to reshape my data.
Could you please tell me how can I prepare my data (input_ids, attention_mask and labels) so they can fit the fit methods, please ?