diff options
-rw-r--r-- | tensorflow/workspace.bzl | 20 | ||||
-rw-r--r-- | third_party/repo.bzl | 7 |
2 files changed, 15 insertions, 12 deletions
diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 20e1aaaf6e..b71f5dc4e5 100644 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -651,7 +651,6 @@ def tf_workspace(path_prefix="", tf_repo_name=""): build_file = str(Label("//third_party/flatbuffers:flatbuffers.BUILD")), ) - tf_http_archive( name = "tflite_mobilenet", sha256 = "23f814d1c076bdf03715dfb6cab3713aa4fbdf040fd5448c43196bd2e97a4c1b", @@ -662,6 +661,16 @@ def tf_workspace(path_prefix="", tf_repo_name=""): build_file = str(Label("//third_party:tflite_mobilenet.BUILD")), ) + tf_http_archive( + name = "tflite_smartreply", + sha256 = "8980151b85a87a9c1a3bb1ed4748119e4a85abd3cb5744d83da4d4bd0fbeef7c", + urls = [ + "https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip", + "https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip" + ], + build_file = str(Label("//third_party:tflite_smartreply.BUILD")), + ) + ############################################################################## # BIND DEFINITIONS # @@ -737,12 +746,3 @@ def tf_workspace(path_prefix="", tf_repo_name=""): name = "zlib", actual = "@zlib_archive//:zlib", ) - - native.new_http_archive( - name = "tflite_smartreply", - build_file = str(Label("//third_party:tflite_smartreply.BUILD")), - sha256 = "8980151b85a87a9c1a3bb1ed4748119e4a85abd3cb5744d83da4d4bd0fbeef7c", - urls = [ - "https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip" - ], - ) diff --git a/third_party/repo.bzl b/third_party/repo.bzl index d6e5dfced0..c29fef9629 100644 --- a/third_party/repo.bzl +++ b/third_party/repo.bzl @@ -67,8 +67,11 @@ def _tf_http_archive(ctx): if ("mirror.bazel.build" not in ctx.attr.urls[0] or (len(ctx.attr.urls) < 2 and ctx.attr.name not in _SINGLE_URL_WHITELIST)): - fail("tf_http_archive(urls) must have redundant URLs. The Bazel Mirror " + - "URL must come first. Please note mirroring happens after merge") + fail("tf_http_archive(urls) must have redundant URLs. The " + + "mirror.bazel.build URL must be present and it must come first. " + + "Even if you don't have permission to mirror the file, please " + + "put the correctly formatted mirror URL there anyway, because " + + "someone will come along shortly thereafter and mirror the file.") ctx.download_and_extract( ctx.attr.urls, "", |