New training arg: warmup_ratio
# 🚀 Feature request

When training or fine-tuning a transformer model, people usually warmup for 10% training steps. For now, transformers only provide the parameter of warmup_steps. A warmup_ratio parameter can be helpful, it means warmup for some percentage of total training steps.

<!-- A clear and concise description of the feature proposal.
     Please provide a link to the paper and code in case they exist. -->

## Motivation

To use the parameter of warmup_steps, people need to know the total training steps. When people use the training epoch parameter instead of max_steps, it is hard to know the total training steps. A warmup_ratio parameter get rid of people knowing total training steps. Another reason for using warmup_ratio parameter is it can help people write less hard code. People have different total training steps for different dataset, but people usually set warmup_ratio as 10% as default.

Original Usage may like this:
`
python run_ner.py --data_dir some_data_dir \
--model_name_or_path some_model \
--output_dir some_output_dir \
--max_seq_length 512 \
--num_train_epochs 10 \
--warmup_steps 35 \
--per_device_train_batch_size 8 \
--do_train \
`

New usage may like this:
`
python run_ner.py --data_dir some_data_dir \
--model_name_or_path some_model \
--output_dir some_output_dir \
--max_seq_length 512 \
--num_train_epochs 10 \
--warmup_ratio 0.1 \
--per_device_train_batch_size 8 \
--do_train \
`

Also, we can merge warmup_step and warmup_ratio into one parameter. If user input a number 0 <= x < 1, it will be considered as warmup_ratio. If user input an interger, it will be considered as warmup_step.

<!-- Please outline the motivation for the proposal. Is your feature request
     related to a problem? e.g., I'm always frustrated when [...]. If this is related
     to another GitHub issue, please link here too. -->

## Your contribution

I can submit a PR to complete this feature. If similar feature is alreadly in this repo, please just close this issue.

<!-- Is there any way that you could help, e.g. by submitting a PR?
     Make sure to read the CONTRIBUTING.MD readme:
     https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md -->

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
<|||||>Well, I think it is a useful feature since PLMs like RoBERTa require setting task-specific warmup-steps, which is annoying. But the design of merge warmup-steps and warmup-ratio together may not be a good idea.  <|||||>Hi @TobiasLee,
Agreed with not merging both `warmup_steps` and `warmup_ratio` into a single parameter. It seems cleaner to give higher precedence to one over the other in case both are given by user.  

I have raised a [PR](https://github.com/huggingface/transformers/pull/10229) with the same implemented.  
Your review is appreciated!