Nanobit commited on
Commit
93acb64
1 Parent(s): bdfe7c9

Fix load error

Browse files
Files changed (1) hide show
  1. scripts/finetune.py +2 -2
scripts/finetune.py CHANGED
@@ -131,10 +131,10 @@ def train(
131
 
132
  # load the config from the yaml file
133
  with open(config, "r") as f:
134
- cfg: Dict = Dict(lambda: None, yaml.load(f, Loader=yaml.Loader))
135
  # if there are any options passed in the cli, if it is something that seems valid from the yaml,
136
  # then overwrite the value
137
- cfg_keys = dict(cfg).keys()
138
  for k in kwargs:
139
  # if not strict, allow writing to cfg even if it's not in the yml already
140
  if k in cfg_keys or cfg.strict is False:
 
131
 
132
  # load the config from the yaml file
133
  with open(config, "r") as f:
134
+ cfg: Dict = Dict(yaml.load(f, Loader=yaml.Loader))
135
  # if there are any options passed in the cli, if it is something that seems valid from the yaml,
136
  # then overwrite the value
137
+ cfg_keys = cfg.keys()
138
  for k in kwargs:
139
  # if not strict, allow writing to cfg even if it's not in the yml already
140
  if k in cfg_keys or cfg.strict is False: