Skip to content

Commit

Permalink
Update conditional None handling (#436)
Browse files Browse the repository at this point in the history
* Update conditional None handling

* Formatting

---------

Co-authored-by: Dong Hyuk Chang <[email protected]>
  • Loading branch information
thomasdhc and thomasdhc authored Oct 2, 2024
1 parent f283b18 commit 35e4393
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ def setup_trainer_and_model(args):
)
if trainer.precision == "16":
pretrained_cfg.megatron_amp_O2 = False
if args.dist_ckpt_load_strictness is not None:
if (
args.dist_ckpt_load_strictness is not None
and args.dist_ckpt_load_strictness != "None"
):
pretrained_cfg.dist_ckpt_load_strictness = (
args.dist_ckpt_load_strictness
)
Expand Down

0 comments on commit 35e4393

Please sign in to comment.