Skip to content

Commit

Permalink
add model.yaml save to context to io_dump
Browse files Browse the repository at this point in the history
Signed-off-by: HuiyingLi <[email protected]>
  • Loading branch information
HuiyingLi committed Oct 21, 2024
1 parent 4c3de48 commit 4ea3505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpoint_converters/convert_nemo1_to_nemo2.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def skip_fp8_load(x):
#Corresponding to Connector: on_import_ckpt
if hasattr(trainer.model, "__io__") and hasattr(trainer.model.tokenizer, '__io__'):
trainer.model.__io__.tokenizer = trainer.model.tokenizer.__io__
TrainerContext.from_trainer(trainer).io_dump(ckpt_to_context_subdir(args.output_path))
TrainerContext.from_trainer(trainer).io_dump(ckpt_to_context_subdir(args.output_path), yaml_attrs=["model"])

#remove tmp dir
if os.path.isdir(tokenizer_tmp_dir):
Expand Down

0 comments on commit 4ea3505

Please sign in to comment.