Skip to content

Commit

Permalink
fix(exputils): condition should be any
Browse files Browse the repository at this point in the history
  • Loading branch information
nps1ngh committed Apr 17, 2023
1 parent 730036d commit 3feba9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bcos/experiments/utils/experiment_utils/loading_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_model_state_dict(
model_state_dict = training_ckpt["state_dict"]
prefix = cls.MODEL_STATE_DICT_EMA_PREFIX if ema else cls.MODEL_STATE_DICT_PREFIX

if ema and not all(k.startswith(prefix) for k in model_state_dict.keys()):
if ema and not any(k.startswith(prefix) for k in model_state_dict.keys()):
raise EMANotFound("EMA state dict not found in training checkpoint!")

model_state_dict = change_state_dict_keys(
Expand Down

0 comments on commit 3feba9a

Please # to comment.