glue_convert_examples_to_features in  glue.py runs to  errors
Author: nargesam
Pull request: no

## 🐛 Bug

<!-- Important information -->

Model I am using: Bert

Language I am using the model on (English)

The problem arise when using:
* [x] the official example scripts: (give details):
I have a venv running with TF2.0 and transformers, and I am running mrpc dataset with BERT. Here's the code: 

train_dataset = glue_convert_examples_to_features(data['train'], tokenizer, max_length=128, task='mrpc')
valid_dataset = glue_convert_examples_to_features(data['validation'], tokenizer, max_length=128, task='mrpc')
train_dataset = train_dataset.shuffle(100).batch(32).repeat(2)
valid_dataset = valid_dataset.batch(64)


The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)


## To Reproduce

Steps to reproduce the behavior:

I am using the official code on hugging face for BERT and  sequence calssification and it is not working... 


tokenizer = BertTokenizer.from_pretrained('bert-base-cased')
model = TFBertForSequenceClassification.from_pretrained('bert-base-cased', force_download=True)
data = tensorflow_datasets.load('glue/mrpc')


<!-- If you have a code sample, error messages, stack traces, please provide it here as well. -->
Error message: 

File "hugf-bert.py", line 20, in <module>
    train_dataset = glue_convert_examples_to_features(data['train'], tokenizer, max_length=128, task='mrpc')
  File "/Users/ns5kn/Documents/insight/transformers/src/transformers/data/processors/glue.py", line 84, in glue_convert_examples_to_features
    logger.info("Writing example %d/%d" % (ex_index, len(examples)))
TypeError: object of type '_OptionsDataset' has no len()

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

* OS: mac 10.14
* Python version: 3.6
* Tensorflow version: 2.0
* PyTorch Transformers version (or branch):
* Using GPU ?
* Distributed or parallel setup ?
* Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->


Comments:
# Load dataset, tokenizer, model from pretrained model/vocabulary
tokenizer = BertTokenizer.from_pretrained('bert-base-cased')
model = TFBertForSequenceClassification.from_pretrained('bert-base-cased', force_download=True)
data = tensorflow_datasets.load('glue/mrpc')

print("checkpoint on data")
# Prepare dataset for GLUE as a tf.data.Dataset instance

print(type(data['train']))
train_data = data['train']
train_dataset = glue_convert_examples_to_features(train_data, tokenizer, max_length=128 , task='mrpc')
valid_dataset = glue_convert_examples_to_features(data['validation'], tokenizer, max_length=128, task='mrpc')
train_dataset = train_dataset.shuffle(100).batch(32).repeat(2)
valid_dataset = valid_dataset.batch(64)


This  is the whole code I am running!! 
this is the error: 


train_dataset = glue_convert_examples_to_features(train_data, tokenizer, max_length=128 , task='mrpc')
  File "./transformers/data/processors/glue.py", line 84, in glue_convert_examples_to_features
    logger.info("Writing example %d/%d" % (ex_index, len(examples)))
TypeError: object of type '_OptionsDataset' has no len()

Hi! Indeed, it seems there was an error in the code. It was fixed by @neonbjb in https://github.com/huggingface/transformers/pull/2564.

Could you install from source and let me know if it fixes your issue? `pip install git+https://github.com/huggingface/transformers`. Thank you.

Yes, the issue is resolved. Thank you!!