import copy


def _normalize_data_to_send(info):
    """Cleans up the data to send to the cloud service.

    Args:
        info (dict): the data to send

    Returns:
      dict: the info object, cleaned.
    """
    # Remove the parts of the data that are unbounded in size.
    info = copy.deepcopy(info)
    for key in ['model_config', 'epoch_history']:
        if key in info:
            del info[key]
    return info