import torch


def load_checkpoint(checkpoint_path: str):
    """
    Loads a model checkpoint with the model on CPU and in eval mode.

    :param checkpoint_path: Path to model checkpoint to load.
    :return: Returns a tuple with the model, optimizer, epoch number, iteration number, and auc@0.05 of the loaded model.
    """
    # Load state
    state = torch.load(checkpoint_path, map_location=lambda storage, location: storage)
    #state['model'].eval()

    return state['model_state'], state['optimizer'], state['epoch'], state['iter_count'], state['auc05'], state['config']