

TITLE
EncoderDecoderModel works poorly with Mlflow

COMMENTS
3

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

BODY
## 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: 4.0.0

## Description
Mlflow keeps track of model config parameters, EncoderDecoderConfig has `encoder` and `decoder` parameters which are basically configs of encoder and decoder. They are converted first `to_dict` and then to string `str()` by mlflow resulting in a long string that can not be fit. The `MAX_PARAM_VAL_LENGTH` of Mlflow is set to 250 and AFAIK can not be changed. 

This result in an error:
`MlflowException: Param value '{'return_dict': True, 'output_hidden_states': False, 'output_attentions': False, 'torchscript': False, 'use_bfloat16': False, 'pruned_heads': {}, 'tie_word_embeddings': True, 'is_encoder_decoder': False, 'is_decoder': False, 'add_cross_attention': Fa' had length 1669, which exceeded length limit of 250`

My solution for training phase is:
```
class DummyClass:
    def to_dict(self):
        return {}
    
model.config.encoder = DummyClass()
model.config.decoder = DummyClass() 
```
@patrickvonplaten