Question about adafactor trainer

I’m new to huggingface and currently I want to build a customized adafactor optimizer. The problem is that whenever I change the setting to relative_step = True, the trainer throws error when trying to save trainer_state.json. Here is the error screenshot

When I set the lr to constant, there won’t be any error. I wonder how to solve this and is this a problem with adafactor?
Here is my code