92816c9b9fa67b63a5638fd50e012e28f76bb4d9,gluoncv/model_zoo/model_store.py,,get_model_file,#Any#Any#Any#,186
Before Change
else:
sha1_hash = _model_sha1[name]
if os.path.exists(file_path):
if check_sha1(file_path, sha1_hash):
return file_path
else:
print("Mismatch in the content of model file detected. Downloading again.")
else:
print("Model file is not found. Downloading.")
if not os.path.exists(root):
After Change
short_hash=short_hash(name))
root = os.path.expanduser(root)
params_path = os.path.join(root, file_name + ".params")
lockfile = os.path.join(root, file_name + ".lock")
if use_tag:
sha1_hash = tag
else:
sha1_hash = _model_sha1[name]
with portalocker.Lock(lockfile, timeout=int(os.environ.get("GLUON_MODEL_LOCK_TIMEOUT", 300))):
if os.path.exists(params_path):
if check_sha1(params_path, sha1_hash):
return params_path
else:
logging.warning("Hash mismatch in the content of model file "%s" detected. "
"Downloading again.", params_path)
else:
logging.info("Model file not found. Downloading.")
if not os.path.exists(root):
os.makedirs(root)
zip_file_path = os.path.join(root, file_name + ".zip")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: dmlc/gluon-cv
Commit Name: 92816c9b9fa67b63a5638fd50e012e28f76bb4d9
Time: 2019-11-26
Author: pedro.larroy.lists@gmail.com
File Name: gluoncv/model_zoo/model_store.py
Class Name:
Method Name: get_model_file
Project Name: streamlit/streamlit
Commit Name: cf2e5c02c448c6f25136a4cd1b89e7f0ba1a3d37
Time: 2018-07-06
Author: adrien.g.treuille@gmail.com
File Name: lib/streamlit/config.py
Class Name:
Method Name: get_s3_option
Project Name: streamlit/streamlit
Commit Name: c786913462decebc4157ac3e8d2ec08303021adc
Time: 2018-07-02
Author: adrien.g.treuille@gmail.com
File Name: lib/streamlit/config.py
Class Name:
Method Name: get_s3_option