def pack_name(publisher_name, data_name):
    """
    Construct a packed string used for naming pyromancy's compute messages.

    Args:
        publisher_name (str): the entity from which the message originates
            examples: 'accuracy', 'nll', 'model_checkpoint', 'early_stopping'
        data_name (str): the name of the data which the message originates
            examples: 'train', 'test', 'val'

    Returns:
        the packed message name (str)
    """
    return "{}|{}".format(publisher_name, data_name)