Skip to content

Commit

Permalink
[Fix] Close FileHandler in Windows to delete tmporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
cir7 committed Jun 25, 2023
1 parent 227a49c commit f268d61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/analysis_tools/confusion_matrix.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import logging
import tempfile

import torch
Expand Down Expand Up @@ -83,6 +84,7 @@ def main():
classes = runner.test_loop.dataloader.dataset.metainfo.get(
'classes')
cm = runner.test()['confusion_matrix/result']
logging.shutdown()
else:
predictions = load(args.ckpt_or_result)
evaluator = Evaluator(ConfusionMatrix())
Expand Down

0 comments on commit f268d61

Please # to comment.