Multiple test datasets, metric name depend of dataset #10221
Unanswered
cdancette
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment 1 reply
-
you can pass in multiple test dataloader together and additionally you will get a an additional argument class LitModel(pl.LightningModule):
...
def test_step(self, batch, batch_idx, dataloader_idx):
...
metrics = {f"test_acc_{dataloader_idx + 1}": acc, ...} # + 1 because they 0-indexed
...
trainer.test(module, dataloaders=[test1_dataloader, test2_dataloader]) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
What is the correct way to have multiple test sets and have the metric names (for ex accuracy) that depend on the test dataset name ?
For example:
and in in my module:
Here, both datasets will use the same "test_acc" metric. I'd like to have two different names, for example test_acc_1 and test_acc_2
Beta Was this translation helpful? Give feedback.
All reactions