pere commited on
Commit
2d27b2a
1 Parent(s): 428f194

script with errors

Browse files
events.out.tfevents.1625761047.t1v-n-55481057-w-0.27349.3.v2 ADDED
Binary file (40 Bytes). View file
 
events.out.tfevents.1625761798.t1v-n-55481057-w-0.33690.3.v2 ADDED
Binary file (40 Bytes). View file
 
events.out.tfevents.1625762036.t1v-n-55481057-w-0.35175.3.v2 ADDED
Binary file (40 Bytes). View file
 
events.out.tfevents.1625762939.t1v-n-55481057-w-0.36715.3.v2 ADDED
Binary file (40 Bytes). View file
 
events.out.tfevents.1625763484.t1v-n-55481057-w-0.38251.3.v2 ADDED
Binary file (40 Bytes). View file
 
events.out.tfevents.1625763883.t1v-n-55481057-w-0.39784.3.v2 ADDED
Binary file (40 Bytes). View file
 
run_translation_t5_flax.py CHANGED
@@ -131,6 +131,7 @@ class DataTrainingArguments:
131
  metadata={"help": "The name of the column in the datasets containing the summaries (for summarization)."},
132
  )
133
  train_file: Optional[str] = field(default=None, metadata={"help": "The input training data file (a text file)."})
 
134
  validation_file: Optional[str] = field(
135
  default=None,
136
  metadata={"help": "An optional input evaluation data file to evaluate the perplexity on (a text file)."},
@@ -498,7 +499,7 @@ def main():
498
  )
499
 
500
  # Metric
501
- metric = load_metric("rouge")
502
 
503
  def postprocess_text(preds, labels):
504
  preds = [pred.strip() for pred in preds]
@@ -515,9 +516,11 @@ def main():
515
  decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)
516
 
517
  # Some simple post-processing
518
- decoded_preds, decoded_labels = postprocess_text(decoded_preds, decoded_labels)
519
-
520
- result = metric.compute(predictions=decoded_preds, references=decoded_labels, use_stemmer=True)
 
 
521
  # Extract a few results from ROUGE
522
  result = {key: value.mid.fmeasure * 100 for key, value in result.items()}
523
 
 
131
  metadata={"help": "The name of the column in the datasets containing the summaries (for summarization)."},
132
  )
133
  train_file: Optional[str] = field(default=None, metadata={"help": "The input training data file (a text file)."})
134
+ test_file: Optional[str] = field(default=None, metadata={"help": "The input test data file (a text file)."})
135
  validation_file: Optional[str] = field(
136
  default=None,
137
  metadata={"help": "An optional input evaluation data file to evaluate the perplexity on (a text file)."},
 
499
  )
500
 
501
  # Metric
502
+ metric = load_metric("bleu")
503
 
504
  def postprocess_text(preds, labels):
505
  preds = [pred.strip() for pred in preds]
 
516
  decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)
517
 
518
  # Some simple post-processing
519
+ #Probably not needed for bleu - pere
520
+ #decoded_preds, decoded_labels = postprocess_text(decoded_preds, decoded_labels)
521
+
522
+ breakpoint()
523
+ result = metric.compute(predictions=decoded_preds, references=decoded_labels)
524
  # Extract a few results from ROUGE
525
  result = {key: value.mid.fmeasure * 100 for key, value in result.items()}
526