I paste some dummy code but I think the explanation is more important (unless I have overlooked something): Thelr_scheduler_type="cosine_with_restarts"that I pass to theTrainingArgumentsis used to callget_scheduler()inoptimization.py. There it's mapped toget_cosine_with_hard_restarts_schedule...