from transformers import TrainingArguments
training_args = TrainingArguments(
     output_dir="detr-resnet-50_finetuned_cppe5",
     per_device_train_batch_size=8,
     num_train_epochs=10,
     fp16=True,
     save_steps=200,
     logging_steps=50,
     learning_rate=1e-5,
     weight_decay=1e-4,
     save_total_limit=2,
     remove_unused_columns=False,
     push_to_hub=True,
 )

Finally, bring everything together, and call [~transformers.Trainer.train]: