

TITLE
Incorrect check for MLFlow active run in MLflowCallback

COMMENTS
0

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
### System Info

```shell
- mlflow==1.25.1
- `transformers` version: 4.19.0.dev0
- Platform: Linux-5.10.76-linuxkit-aarch64-with-glibc2.31
- Python version: 3.9.7
- Huggingface_hub version: 0.2.1
- PyTorch version (GPU?): 1.10.2 (False)
```


### Who can help?

Should be fixed by #17067

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

Steps to reproduce:
1. Follow Training tutorial as per https://huggingface.co/docs/transformers/training
2. Change the training arguments to use `TrainingArguments(output_dir="test_trainer", report_to=['mlflow'], run_name="run0")`
3. On `trainer.train()` the MLFlow UI should report a run with a Run Name of `run0` which is not currently the case.

Cause of the Issue:
```
>> import mlflow
>> print(mlflow.active_run is None, mlflow.active_run() is None)
False True
```

In `src/transformers/integrations.py` the line `if self._ml_flow.active_run is None:` need to be replaced by `if self._ml_flow.active_run() is None:`

### Expected behavior

PR #14894 introduce support for run_name in the MLflowCallback. Though, this does not work as expected since the active run is checked using a method reference that always returns true. Bug introduced by #16131.
