Update `copy_model_files()`

This commit is contained in:
Eren Gölge 2021-09-30 14:24:24 +00:00
parent 4163b4f2e4
commit 9a0d8fa027
1 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ def copy_model_files(config: Coqpit, out_path, new_fields):
"""
copy_config_path = os.path.join(out_path, "config.json")
# add extra information fields
if new_fields:
config.update(new_fields, allow_new=True)
# TODO: Revert to config.save_json() once Coqpit supports arbitrary paths.
with fsspec.open(copy_config_path, "w", encoding="utf8") as f: