bitorch.models.model_hub.lightning_checkpoint_to_state_dict

bitorch.models.model_hub.lightning_checkpoint_to_state_dict(artifact: Dict[Any, Any]) Dict[Any, Any][source]

converts a pytorch lightning checkpoint to a normal torch state dict

Parameters:

artifact (Dict[Any, Any]) – dict containing a [‘state_dict’] attribute

Returns:

state dict for model

Return type:

Dict[Any, Any]