Skip to content

Commit

Permalink
Revert load_checkpoint_to_model
Browse files Browse the repository at this point in the history
  • Loading branch information
harimkang committed Sep 30, 2024
1 parent b30423e commit 648e3e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/otx/algo/utils/mmengine_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def load_checkpoint_to_model(
"""
# get state_dict from checkpoint
# TODO(Kirill): remove this when RTDETR weights is updloaded to openvino storage.
state_dict = checkpoint["ema"]["module"] if "ema" in checkpoint else checkpoint.get("model_state", checkpoint)
state_dict = checkpoint["ema"]["module"] if "ema" in checkpoint else checkpoint.get("state_dict", checkpoint)

# strip prefix of state_dict
metadata = getattr(state_dict, "_metadata", OrderedDict())
Expand Down

0 comments on commit 648e3e4

Please sign in to comment.