Fixed RAG script which was failing on dummy example (#21416)
* do not use prefix="val" for test The dummy example fails when test_epoch_end is called. The prefix="test" should be dynamic in the log metrics too. * Create test.source * Create test.target
This commit is contained in:
@@ -408,11 +408,11 @@ class GenerativeQAModule(BaseTransformer):
|
||||
self.save_metrics(metrics, prefix) # writes to self.metrics_save_path
|
||||
|
||||
log_dict = {
|
||||
"val_avg_em": metrics["val_avg_em"],
|
||||
f"{prefix}_avg_em": metrics[f"{prefix}_avg_em"],
|
||||
"step_count": metrics["step_count"],
|
||||
"val_avg_loss": metrics["val_avg_loss"],
|
||||
"val_loss": loss,
|
||||
"val_em": metrics_tensor,
|
||||
f"{prefix}_avg_loss": metrics[f"{prefix}_avg_loss"],
|
||||
f"{prefix}_loss": loss,
|
||||
f"{prefix}_em": metrics_tensor,
|
||||
}
|
||||
self.log_dict(log_dict)
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
What does Moses' rod turn into ?
|
||||
Who is Aron?
|
||||
Where did Moses grow up ?
|
||||
What happens at the command of the Moses ?
|
||||
Who manages the Pokémon ?
|
||||
Who owned the Pokémon trademark ?
|
||||
What else include in Pokémon franchise ?
|
||||
How many seasons in Pokémon animme series ?
|
||||
@@ -0,0 +1,8 @@
|
||||
to a snake
|
||||
Moses' assistant
|
||||
Egyptian royal court
|
||||
let his rod turn in to a snake
|
||||
The Pokémon Company
|
||||
Nintendo
|
||||
world's top-selling toy brand, the top-selling trading card game
|
||||
over 20 seasons
|
||||
Reference in New Issue
Block a user