Skip to content

Commit

Permalink
[Fix] Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
fanqiNO1 committed Feb 22, 2024
1 parent 5d1ecca commit 0e7fcdc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmengine/runner/loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ def run_iter(self, idx, data_batch: Sequence[dict]):
# outputs should be sequence of BaseDataElement
with autocast(enabled=self.fp16):
results = self.runner.model.test_step(data_batch)
outputs, loss = list(), dict()
if isinstance(results, tuple):
outputs, loss = results
elif isinstance(results, list):
Expand Down Expand Up @@ -494,6 +495,7 @@ def run_iter(self, idx, data_batch: Sequence[dict]) -> None:
# predictions should be sequence of BaseDataElement
with autocast(enabled=self.fp16):
results = self.runner.model.test_step(data_batch)
outputs, loss = list(), dict()
if isinstance(results, tuple):
outputs, loss = results
elif isinstance(results, list):
Expand Down

0 comments on commit 0e7fcdc

Please sign in to comment.