Repository: huggingface/transformers

Issue:
AttributeError: 'TFTrainingArguments' object has no attribute 'args'
## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->
     
- `transformers` version: 3.2.0
- Platform: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic
- Python version: 3.6.9
- PyTorch version (GPU?): 1.6.0+cu101 (True)
- Tensorflow version (GPU?): 2.3.0 (True)
- Using GPU in script?: True
- Using distributed or parallel set-up in script?: False

### Who can help
<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.
 -->
 Trainer: @sgugger 
 tensorflow: @jplu 


## Information

Model I am using (Bert, XLNet ...): `distilbert-base-uncased`

The problem arises when using:
* [x] the official example scripts: (give details below)
* [ ] my own modified scripts: (give details below)

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [x] my own task or dataset: (give details below)
    IMDB Sequence Classification

## To reproduce

Steps to reproduce the behavior:

1. Follow the [fine-tuning tutorial here and use TensorFlow](https://huggingface.co/transformers/master/custom_datasets.html#fine-tuning-with-trainer)

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

```python
AttributeError                            Traceback (most recent call last)

<ipython-input-10-c5306faf2c2f> in <module>()
     12 )
     13 
---> 14 with training_args.strategy.scope():
     15     model = TFDistilBertForSequenceClassification.from_pretrained("distilbert-base-uncased")
     16 

4 frames

/usr/local/lib/python3.6/dist-packages/transformers/training_args_tf.py in _setup_strategy(self)
    120         logger.info("Tensorflow: setting up strategy")
    121 
--> 122         if self.args.xla:
    123             tf.config.optimizer.set_jit(True)
    124 

AttributeError: 'TFTrainingArguments' object has no attribute 'args'
```

## Expected behavior

<!-- A clear and concise description of what you would expect to happen. -->



Discussion:

Resolving patch:
diff --git a/src/transformers/training_args_tf.py b/src/transformers/training_args_tf.py
--- a/src/transformers/training_args_tf.py
+++ b/src/transformers/training_args_tf.py
@@ -119,7 +119,7 @@ class TFTrainingArguments(TrainingArguments):
     def _setup_strategy(self) -> Tuple["tf.distribute.Strategy", int]:
         logger.info("Tensorflow: setting up strategy")
 
-        if self.args.xla:
+        if self.xla:
             tf.config.optimizer.set_jit(True)
 
         gpus = tf.config.list_physical_devices("GPU")


Test patch: