Skip to content

Commit

Permalink
Fix incorrect behavior to access train pipeline from ConcatDataset
Browse files Browse the repository at this point in the history
…in analyze_results.py (#11004)
  • Loading branch information
guyleaf authored Oct 8, 2023
1 parent bbfa179 commit 4f26a9e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/analysis_tools/analyze_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,12 @@ def main():
cfg.test_dataloader.pop('batch_size', 0)
if cfg.train_dataloader.dataset.type in ('MultiImageMixDataset',
'ClassBalancedDataset',
'RepeatDataset', 'ConcatDataset'):
'RepeatDataset'):
cfg.test_dataloader.dataset.pipeline = get_loading_pipeline(
cfg.train_dataloader.dataset.dataset.pipeline)
elif cfg.train_dataloader.dataset.type in ('ConcatDataset', ):
cfg.test_dataloader.dataset.pipeline = get_loading_pipeline(
cfg.train_dataloader.dataset.datasets[0].pipeline)
else:
cfg.test_dataloader.dataset.pipeline = get_loading_pipeline(
cfg.train_dataloader.dataset.pipeline)
Expand Down

0 comments on commit 4f26a9e

Please sign in to comment.