Skip to content

Commit

Permalink
Add --verbose option to infer_tool (#6770)
Browse files Browse the repository at this point in the history
Detailed infer results printing overload output and freeze sea_runtool.
Hiding debug messages by default.
  • Loading branch information
ishariko authored Jul 26, 2021
1 parent 0c10950 commit 33dfcd6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/conditional_compilation/tools/infer_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ def cli_parser():
parser.add_argument('-d', dest='device', required=True, help='Target device to infer on')
parser.add_argument('-r', dest='out_path', required=True,
help='Dumps results to the output file')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
help='Increase output verbosity')
args = parser.parse_args()
ir_path = args.ir_path
device = args.device
out_path = args.out_path
if args.verbose:
log.getLogger().setLevel(log.DEBUG)
return ir_path, device, out_path


Expand All @@ -74,6 +78,6 @@ def cli_parser():
results = infer(ir_path=ir_path, device=device)
np.savez(out_path, **results)
log.info("Path for inference results: {}".format(out_path))
log.info("Inference results:")
log.info(results)
log.info("SUCCESS!")
log.debug("Inference results:")
log.debug(results)
log.debug("SUCCESS!")

0 comments on commit 33dfcd6

Please sign in to comment.