gpt2 - convert examples to features(tensorflow 2)
I'm trying to fine-tune GPT2 to generate shakespeare text. 
I have variable "train_examples", which is list of InputExamples:
```
>> print(train_examples)
 <__main__.InputExample at 0x7f55e0fafd68>,
 <__main__.InputExample at 0x7f55e0fafda0>,
 <__main__.InputExample at 0x7f55e0fafef0>,
 <__main__.InputExample at 0x7f55e0fafeb8>,
 <__main__.InputExample at 0x7f55e0f6aeb8>,
```
I created the examples using the following function:
```
    def _create_examples(self, lines, set_type):
        """Creates examples for the training and dev sets."""
        examples = []
        for (i, line) in enumerate(lines):
            guid = "%s-%s" % (set_type, i)
            #guid = i
            text_a = line[1]
            examples.append(
                InputExample(guid=guid, text_a=text_a))
        return examples

class InputExample(object):
    def __init__(self, guid, text_a):
        self.guid = guid
        self.text_a = text_a
```

As I understand I need to convert the type to 'features', before I call the fit function. But how can I convert the examples to features? I saw many cases for BERT, but I couldn't find for gpt2.

I tried:
```
from transformers import glue_convert_examples_to_features

input_train_tensor_data = glue_convert_examples_to_features(train_examples, gpt2_tokenizer, max_length=128, task='mrpc')
```

But got:
```
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-118-d04221b84b4f> in <module>()
      1 from transformers import glue_convert_examples_to_features
      2 
----> 3 input_train_tensor_data = glue_convert_examples_to_features(train_examples, gpt2_tokenizer, max_length=128, task='mrpc')

/usr/local/lib/python3.6/dist-packages/transformers/data/processors/glue.py in glue_convert_examples_to_features(examples, tokenizer, max_length, task, label_list, output_mode, pad_on_left, pad_token, pad_token_segment_id, mask_padding_with_zero)
    120 
    121         if output_mode == "classification":
--> 122             label = label_map[example.label]
    123         elif output_mode == "regression":
    124             label = float(example.label)

KeyError: None
```
Hi @yagelardan ,

In order to fine-tune gpt2 you should be able to use this example [script](https://github.com/huggingface/transformers/blob/master/examples/run_language_modeling.py)

Also, you can refer to this issue https://github.com/huggingface/transformers/issues/1407 where people already trained gpt2 on different languages. 
And this issue https://github.com/huggingface/transformers/issues/2008 could help you out :-) 