Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Hardcode commit hash in external dependencies
Browse files Browse the repository at this point in the history
Summary: Fixes potential future issues akin to #9

Reviewed By: mayankrana

Differential Revision: D7964821

fbshipit-source-id: 4c5e53cec294dfb019416c7c9daad08e74e5fce3
  • Loading branch information
lvdmaaten authored and facebook-github-bot committed May 11, 2018
1 parent e11c321 commit c5362e3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions setup.py
Expand Up @@ -35,19 +35,22 @@
# Download inception_v4 and inceptionresnetv2
MODEL_DIR = str("adversarial/lib/models")
INCEPTION_V4_URL = ("https://raw.githubusercontent.com/Cadene/"
"tensorflow-model-zoo.torch/master/inceptionv4/"
"pytorch_load.py")
"tensorflow-model-zoo.torch/"
"f43005c4b4cdd745e9788b22e182c91453c54daf/inceptionv4"
"/pytorch_load.py")
INCEPTION_RESNET_V2_URL = ("https://raw.githubusercontent.com/Cadene/"
"tensorflow-model-zoo.torch/master/"
"inceptionresnetv2/pytorch_load.py")
"tensorflow-model-zoo.torch/"
"f43005c4b4cdd745e9788b22e182c91453c54daf/"
"inceptionresnetv2/pytorch_load.py")
urlopener = urllib.URLopener()
urlopener.retrieve(INCEPTION_V4_URL, os.path.join(MODEL_DIR, "inceptionv4.py"))
urlopener.retrieve(INCEPTION_RESNET_V2_URL,
os.path.join(MODEL_DIR, "inceptionresnetv2.py"))

# Download denoising code for tv_bregman from scikit-image
DENOISE_URL = ("https://raw.githubusercontent.com/scikit-image/scikit-image/"
"master/skimage/restoration/_denoise_cy.pyx")
"902a9a68add274c4125a358b29e3263b9d94f686/skimage/"
"restoration/_denoise_cy.pyx")
urlopener = urllib.URLopener()
urlopener.retrieve(DENOISE_URL, os.path.join(TRANSFORMATION_DIR, "_denoise_cy.pyx"))
# Apply patch to support TVM compressed sensing
Expand Down

0 comments on commit c5362e3

Please sign in to comment.