docstr: This function assumes the checkpoint is just the model and does not include
  training params.
docstr_tok: ["This","function","assumes","the","checkpoint","is","just","the","model","and","does","not","include","training","params","."]
code: def _update_model_checkpoint(
      self, checkpoint: Dict[str, Any], model: torch.nn.Module
  ) -> None:
      """
      This function assumes the checkpoint is just the model and does not include
      training params.
      """
      if not is_pl_model_checkpoint(checkpoint):
          self._update_model_checkpoint_from_mmf(checkpoint)
  
      # this assumes that model_checkpoint here is the lightning format
      self._update_model_format_state_keys(
          checkpoint["state_dict"], model=model
      )
  
      config = registry.get("config")
      if config.checkpoint.get("resume_pretrained", False):
          self._update_pretrained_state_mapping(
              checkpoint=checkpoint["state_dict"],
              model=model,
              config=config,
          )
  
file_path: mmf/mmf/utils/checkpoint_updater.py
imports: import logging
  from typing import Any, Dict, Tuple
  import torch
  from mmf.common.registry import registry
label_desc: Use image node_id 4 for calling the MMFToPLCheckpointUpdater obj's underlying member method code with example usage: obj._update_model_checkpoint(checkpoint, model) without return types