Skip to content

Commit

Permalink
update no_cache usage
Browse files Browse the repository at this point in the history
  • Loading branch information
VanDavv committed Oct 15, 2021
1 parent 873c7ae commit f6e6606
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cli/blobconverter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f6e6606

Please sign in to comment.