Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
josejg committed Jul 17, 2024
1 parent 5c9c1ac commit 9465603
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/eval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,11 @@ def allow_toplevel_keys(cfg: Dict[str, Any]) -> Dict[str, Any]:
raise ValueError(
'Please specify either model or models in the config, not both',
)
default_name = cfg.get('model').get('name')
model_cfg = {
'model': cfg.pop('model'),
'tokenizer': cfg.pop('tokenizer', None),
'model_name': cfg.pop('model_name', 'unnamed'),
'model_name': cfg.pop('model_name', default_name),
}
if 'tokenizer' not in model_cfg or model_cfg['tokenizer'] is None:
raise ValueError(
Expand Down

0 comments on commit 9465603

Please sign in to comment.