You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/14 09:37:09 UTC

[GitHub] nswamy commented on a change in pull request #9963: [MXNET-34] Onnx Module to import onnx models into mxnet

nswamy commented on a change in pull request #9963: [MXNET-34] Onnx Module to import onnx models into mxnet
URL: https://github.com/apache/incubator-mxnet/pull/9963#discussion_r174396952
 
 

 ##########
 File path: python/mxnet/test_utils.py
 ##########
 @@ -1407,12 +1410,15 @@ def download(url, fname=None, dirname=None, overwrite=False):
                 if exc.errno != errno.EEXIST:
                     raise OSError('failed to create ' + dirname)
 
-    if not overwrite and os.path.exists(fname):
+    if not overwrite and os.path.exists(fname) and not version_tag:
         logging.info("%s exists, skipping download", fname)
         return fname
 
     r = requests.get(url, stream=True)
     assert r.status_code == 200, "failed to open %s" % url
+    if version_tag and r.headers['ETag'] != version_tag:
+        logging.info("The version tag of the file does not match the expected version. "
+                     + "Proceeding with the file download...")
 
 Review comment:
   why do you have to download if they don't match

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services