Log custom mlflow artifact using trainer
Author: Sorrow321
Pull request: no

Hello. Is it currently possible to log some custom artifact while using `Trainer` with `report_to='mlflow'`? I tried to do the following:
```
class YAML_SaverCallback(TrainerCallback):
    def __init__(self, trainer) -> None:
        super().__init__()
        self._trainer = trainer
    def on_train_begin(self, args, state, control, **kwargs):
        mlflow.log_artifact("train.yaml", artifact_path="train.yaml")

trainer.add_callback(YAML_SaverCallback(trainer))
```
But it looks like it does not use the MLFlow server that was selected in `mlflow.set_tracking_uri` (I'm using a remote logging server). Apparently, it tries to log it locally:
```
Traceback (most recent call last):
  File "/home/ilya/XXX/train.py", line 333, in <module>
    trainer.train()
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/transformers/trainer.py", line 1275, in train
    self.control = self.callback_handler.on_train_begin(args, self.state, self.control)
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/transformers/trainer_callback.py", line 349, in on_train_begin
    return self.call_event("on_train_begin", args, state, control)
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/transformers/trainer_callback.py", line 390, in call_event
    result = getattr(callback, event)(
  File "/home/ilya/Desktop/XXX/train.py", line 318, in on_train_begin
    mlflow.log_artifact("train.yaml", artifact_path="train.yaml")
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/mlflow/tracking/fluent.py", line 605, in log_artifact
    MlflowClient().log_artifact(run_id, local_path, artifact_path)
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/mlflow/tracking/client.py", line 955, in log_artifact
    self._tracking_client.log_artifact(run_id, local_path, artifact_path)
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/mlflow/tracking/_tracking_service/client.py", line 355, in log_artifact
    artifact_repo.log_artifact(local_path, artifact_path)
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/mlflow/store/artifact/local_artifact_repo.py", line 37, in log_artifact
    mkdir(artifact_dir)
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/mlflow/utils/file_utils.py", line 113, in mkdir
    raise e
  File "/home/ilya/anaconda3/lib/python3.9/site-packages/mlflow/utils/file_utils.py", line 110, in mkdir
    os.makedirs(target)
  File "/home/ilya/anaconda3/lib/python3.9/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/home/ilya/anaconda3/lib/python3.9/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/home/ilya/anaconda3/lib/python3.9/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 2 more times]
  File "/home/ilya/anaconda3/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/opt/mlflow'
```

Comments:
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.