From f6e6606bf4729f191042d3ddf9a0a5723fd80164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pi=C5=82atowski?= Date: Fri, 15 Oct 2021 20:14:21 +0200 Subject: [PATCH] update no_cache usage --- cli/blobconverter/__init__.py | 1 + cli/setup.py | 2 +- main.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/blobconverter/__init__.py b/cli/blobconverter/__init__.py index e6714e0..6975915 100644 --- a/cli/blobconverter/__init__.py +++ b/cli/blobconverter/__init__.py @@ -224,6 +224,7 @@ def compile_blob(blob_name, version=None, shaves=None, req_data=None, req_files= url_params = { 'version': version, + 'no_cache': not use_cache, } data = { "myriad_shaves": str(shaves), diff --git a/cli/setup.py b/cli/setup.py index d45e60e..ff8cd5b 100644 --- a/cli/setup.py +++ b/cli/setup.py @@ -4,7 +4,7 @@ setup( name='blobconverter', - version='1.2.3', + version='1.2.4', description='The tool that allows you to convert neural networks to MyriadX blob', long_description=io.open("README.md", encoding="utf-8").read(), long_description_content_type="text/markdown", diff --git a/main.py b/main.py index 66449a5..a9e02d1 100644 --- a/main.py +++ b/main.py @@ -254,6 +254,7 @@ def compile(): use_zoo = request.values.get('use_zoo', False) data_type = request.values.get('data_type', "FP16") download_ir = request.values.get('download_ir', "false").lower() == "true" + no_cache = request.args.get('no_cache', "false") == "true" if config_file is None: if use_zoo: zoo_path = fetch_from_zoo(env, name) @@ -314,7 +315,7 @@ def compile(): data = None try: - if not download_ir: + if not no_cache or not download_ir: data = bucket.Object("{}.blob".format(req_hash)).get()['Body'].read() with out_path.open("wb") as f: f.write(data)