Skip to content

Commit

Permalink
Merge branch 'cherry-pick-51648635' into 'main'
Browse files Browse the repository at this point in the history
ckpt learning rate scheduler fix

See merge request ADLR/megatron-lm!815
  • Loading branch information
jaredcasper committed Oct 6, 2023
2 parents 4c0daab + 809bd3c commit 0c9c4f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions megatron/core/dist_checkpointing/dict_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def extract_matching_values(
match, nonmatch = extract_matching_values(v, predicate)
if match:
matching_vals[k] = match
if nonmatch:
if nonmatch or not v:
nonmatching_vals[k] = nonmatch
elif predicate(v):
matching_vals[k] = v
Expand All @@ -35,7 +35,7 @@ def extract_matching_values(
match, nonmatch = extract_matching_values(v, predicate)
if match:
matching_vals.append(match)
if nonmatch:
if nonmatch or not v:
nonmatching_vals.append(nonmatch)
elif predicate(v):
matching_vals.append(v)
Expand Down

0 comments on commit 0c9c4f3

Please sign in to comment.