My apologies for the delayed response. I didn’t receive the email.
You should use the get_linear_schedule_with_warmup function instead of WarmupLinearSchedule.
The code will be:
from transformers import AdamW, get_linear_schedule_with_warmup
and
scheduler = WarmupLinearSchedule(optimizer, warmup_steps=WARMUP_STEPS, t_total = -1)
should be replaced with:
scheduler = get_linear_schedule_with_warmup(optimizer, num_warmup_steps=WARMUP_STEPS, num_training_steps = -1)
reference: https://github.com/huggingface/transformers/issues/2082 4