Skip to content

Commit

Permalink
add filename to batch for testing (#333)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Morris <[email protected]>
  • Loading branch information
benjijamorris and Benjamin Morris authored Feb 15, 2024
1 parent 87c7617 commit 3610b76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cyto_dl/models/im2im/multi_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def _get_run_heads(self, batch, stage):
return run_heads

def model_step(self, stage, batch, batch_idx):
batch["filenames"] = batch[self.hparams.x_key].meta.get("filename_or_obj", batch_idx)
# convert monai metatensors to tensors
for k, v in batch.items():
if isinstance(v, MetaTensor):
Expand Down

0 comments on commit 3610b76

Please sign in to comment.