fix cove for backwards compat with old checkpoints

This commit is contained in:
Bryan Marcus McCann 2018-08-29 18:50:42 +00:00
parent 847a9dd094
commit 956ea52a5b
1 changed files with 5 additions and 2 deletions

View File

@ -173,9 +173,12 @@ def get_args():
'transformer_layers', 'rnn_layers', 'transformer_hidden',
'dimension', 'load', 'max_val_context_length', 'val_batch_size',
'transformer_heads', 'max_output_length', 'max_generative_vocab',
'lower']
'lower', 'cove']
for r in retrieve:
setattr(args, r, config[r])
if r in config:
setattr(args, r, config[r])
else:
setattr(args, r, None)
args.dropout_ratio = 0.0
args.task_to_metric = {'cnn_dailymail': 'avg_rouge',