From b0c1ddad3db24ffcdb06a52b75eb2c87879e7ad9 Mon Sep 17 00:00:00 2001 From: Dmitrii Agibov Date: Mon, 30 Jan 2023 09:20:44 +0000 Subject: MLIA-784 Make CLI options order independent - Change logic for parameter "-b/--backend" to avoid dependency between CLI options Change-Id: Ic98cb4eb6340cf249fcaa8ec55d17d21b5664b81 --- README.md | 6 ++++-- src/mlia/cli/options.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d163728..62805aa 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,13 @@ mlia check ~/models/mobilenet_v1_1.0_224_quant.tflite \ --target-profile ethos-u55-256 \ --performance -# Explicitly specify the target profile and backend(s) to use with --backend +# Explicitly specify the target profile and backend(s) to use +# with --backend option mlia check ~/models/ds_cnn_large_fully_quantized_int8.tflite \ --target-profile ethos-u65-512 \ --performance \ - --backend "Vela" "Corstone-310" + --backend "Vela" \ + --backend "Corstone-300" # Get help and further information mlia check --help diff --git a/src/mlia/cli/options.py b/src/mlia/cli/options.py index bae6219..5aca3b3 100644 --- a/src/mlia/cli/options.py +++ b/src/mlia/cli/options.py @@ -203,7 +203,7 @@ def add_backend_options( "-b", "--backend", help="Backends to use for evaluation.", - nargs="+", + action="append", choices=available_backends, type=only_one_corstone_checker(), ) -- cgit v1.2.1