Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FlatBuffers python library version from 1.12.0 to 2.0.0 in TFLite #671

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions tensorflow_lite_support/tools/pip_package/setup.py
Expand Up @@ -52,9 +52,7 @@
REQUIRED_PACKAGES = [
'absl-py >= 0.7.0',
'numpy >= 1.19.2',
# TODO(b/187981032): remove the constraint for 2.0 once the incompatibile
# issue is resolved.
'flatbuffers >= 1.12, <2',
'flatbuffers >= 2.0.0',
] + SETUP_PACKAGES

project_name = 'tflite-support'
Expand Down
4 changes: 2 additions & 2 deletions third_party/flatbuffers/BUILD.bazel
Expand Up @@ -103,15 +103,14 @@ cc_library(
visibility = ["//visibility:public"],
)

# Note: Don't include "flexbuffers.py" as it's not available in the latest
# pip package (version 1.12.0) and causes failures in internal pip tests.
flatbuffer_py_strip_prefix_srcs(
name = "flatbuffer_py_strip_prefix",
srcs = [
"python/flatbuffers/__init__.py",
"python/flatbuffers/builder.py",
"python/flatbuffers/compat.py",
"python/flatbuffers/encode.py",
"python/flatbuffers/flexbuffers.py",
"python/flatbuffers/number_types.py",
"python/flatbuffers/packer.py",
"python/flatbuffers/table.py",
Expand All @@ -127,6 +126,7 @@ filegroup(
"builder.py",
"compat.py",
"encode.py",
"flexbuffers.py",
"number_types.py",
"packer.py",
"table.py",
Expand Down
8 changes: 4 additions & 4 deletions third_party/flatbuffers/workspace.bzl
Expand Up @@ -5,11 +5,11 @@ load("//third_party:repo.bzl", "third_party_http_archive")
def repo():
third_party_http_archive(
name = "flatbuffers",
strip_prefix = "flatbuffers-1.12.0",
sha256 = "62f2223fb9181d1d6338451375628975775f7522185266cd5296571ac152bc45",
strip_prefix = "flatbuffers-2.0.0",
sha256 = "9ddb9031798f4f8754d00fca2f1a68ecf9d0f83dfac7239af1311e4fd9a565c4",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/flatbuffers/archive/v1.12.0.tar.gz",
"https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/flatbuffers/archive/v2.0.0.tar.gz",
"https://github.com/google/flatbuffers/archive/v2.0.0.tar.gz",
],
build_file = "//third_party/flatbuffers:BUILD.bazel",
delete = ["build_defs.bzl"],
Expand Down