Skip to content

Progress bar does not forward correctly #985

@wangruohui

Description

@wangruohui

Problem should lies at the following codes.

mmcv/mmcv/engine/test.py

Lines 35 to 38 in 5a99f58

# use the first key as main key to calculate the batch size
batch_size = len(next(iter(data.values())))
for _ in range(batch_size):
prog_bar.update()

When running with classification, the first values (image_meta) is a data container with nested list, like DataContainer([[{meta1}, {meta2}, ... ]]), thus batch_size = 1 and is not desired.

I suggest using the length of the result as batch size, would it be good to all packages?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions