Skip to content

Commit c14cf95

Browse files
authored
fix: set optimizer_name in train_state when loading checkpoint without optimizer (#1203)
1 parent c67fc1f commit c14cf95

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

python/train.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ def load():
780780

781781
else:
782782
logging.info("WARNING: Optimizer not found in state dict, using fresh optimizer")
783+
train_state["optimizer_name"] = optimizer_name
783784

784785
return (model_config, ddp_model, raw_model, swa_model, optimizer, metrics_obj, running_metrics, train_state, last_val_metrics)
785786

0 commit comments

Comments
 (0)