From aec99d708c8ff1a4fd6963170f222844126df353 Mon Sep 17 00:00:00 2001 From: jakaskerl <53253318+jakaskerl@users.noreply.github.com> Date: Thu, 21 Mar 2024 18:27:39 +0100 Subject: [PATCH] Fixing compiler_params Added nargs="+" option to argparser to interpret `--compile-params` as list and not as string. This way, the `"myriad_params_advanced": ' '.join(compile_params)` works as expected. Same can be done for optimizer_params. --- cli/blobconverter/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/blobconverter/__init__.py b/cli/blobconverter/__init__.py index 37ce986..2b6c3e0 100644 --- a/cli/blobconverter/__init__.py +++ b/cli/blobconverter/__init__.py @@ -526,7 +526,7 @@ def __run_cli__(): parser.add_argument('-o', '--output-dir', help="Directory where the output blob should be saved") parser.add_argument('-v', '--version', choices=[Versions.v2021_2, Versions.v2021_3, Versions.v2021_4, Versions.v2022_1, Versions.v2022_3_RVC3], help=f"OpenVINO version to use for conversion. To export model for RVC3, you must set OpenVINO version to '{Versions.v2022_3_RVC3}'.") parser.add_argument('--optimizer-params', help="Additional params to use when converting a model to OpenVINO IR") - parser.add_argument('--compile-params', help="Additional params to use when compiling a model to MyriadX blob") + parser.add_argument('--compile-params', nargs="+", help="Additional params to use when compiling a model to MyriadX blob") parser.add_argument('--converter-url', dest="url", help="URL to BlobConverter API endpoint used for conversion") parser.add_argument('--no-cache', dest="use_cache", action="store_false", help="Omit .cache directory and force new compilation of the blob") parser.add_argument('--dry', dest="dry", action="store_true", help="Instead of compiling the blob, return compilation commands (for manual conversion)")