def text(writer: SummaryWriter, sample: Tuple, prefix: str, task_name: str, key: str): X, y = sample writer.add_text(f'{prefix}_{task_name}_text', X[key])
def text_publisher(writer: SummaryWriter, tag: str, sample: Any, idx: int): writer.add_text(f'{tag}_text', sample, global_step=idx)