TypeError: '>' not supported between instances of 'NoneType' and 'int' - Error while training distill bert

I came across same problem, which seems to be an issue according to a stackoverflow answer:deep learning - HUGGINGFACE TypeError: '>' not supported between instances of 'NoneType' and 'int' - Stack Overflow