src/baselines/unifiedqa.py
def prep_example_prost_gcp(example):
  """ Prepare PROST example for the T5 Colab Notebook """

  template = '{ex_question} \\n (A) {A} (B) {B} (C) {C} (D) {D} \\n {context}'

  instance = {
    'input': template.format_map(example),
    'target': example[list('ABCD')[example['label']]],
    'target_idx': example['label'],
    **example}
  return instance
 Prepare PROST example for the T5 Colab Notebook 
Prepare PROST example for the T5 Colab Notebook
Prepare PROST example for the T5 Colab Notebook
def prep_example_prost_gcp(example):
  template = '{ex_question} \\n (A) {A} (B) {B} (C) {C} (D) {D} \\n {context}'
  instance = {
    'input': template.format_map(example),
    'target': example[list('ABCD')[example['label']]],
    'target_idx': example['label'],
    **example}
  return instance
def prep_example_prost_gcp ( example ) : template = '{ex_question} \\n (A) {A} (B) {B} (C) {C} (D) {D} \\n {context}' instance = { 'input' : template . format_map ( example ) , 'target' : example [ list ( 'ABCD' ) [ example [ 'label' ] ] ] , 'target_idx' : example [ 'label' ] , ** example } return instance
Prepare PROST example for the T5 Colab Notebook
Prepare PROST example for the T5 Colab Notebook
""" Prepare PROST example for the T5 Colab Notebook """
example