Skip to content

Commit

Permalink
Merge branch 'tensorflow:master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-hmarzouk authored Jun 5, 2022
2 parents fab7f15 + f31422e commit 6746017
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.1
5.0.0
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ of releases [here](https://github.com/tensorflow/io/releases).

| TensorFlow I/O Version | TensorFlow Compatibility | Release Date |
| --- | --- | --- |
| 0.26.0 | 2.9.x | May 17, 2022 |
| 0.25.0 | 2.8.x | Apr 19, 2022 |
| 0.24.0 | 2.8.x | Feb 04, 2022 |
| 0.23.1 | 2.7.x | Dec 15, 2021 |
| 0.23.0 | 2.7.x | Dec 14, 2021 |
Expand Down
30 changes: 30 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# Release 0.26.0

## Major Features and Bug Fixes
* Updated arrow version to 7.0.0

## Thanks to our Contributors

This release contains contributions from many people:

372046933, Colin, Yong Tang

We are also grateful to all who filed issues or helped resolve them, asked and
answered questions, and were part of inspiring discussions.

# Release 0.25.0

## Major Features and Bug Fixes
* Decrease max bytes read from hdfs
* Hide mongodb connection uri from being logged
* Update log level from fetal to error when loading the libhdfs.so failed

## Thanks to our Contributors

This release contains contributions from many people:

Junfan Zhang, Stan Chen, Vignesh Kothapalli, Yong Tang, trabenx, yleeeee

We are also grateful to all who filed issues or helped resolve them, asked and
answered questions, and were part of inspiring discussions.

# Release 0.24.0

## Major Features and Bug Fixes
Expand Down
40 changes: 18 additions & 22 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "zlib",
build_file = "//third_party:zlib.BUILD",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
patch_cmds = ["""sed -i.bak '29i\\'$'\\n#include<zconf.h>\\n' contrib/minizip/crypt.h"""],
sha256 = "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9",
strip_prefix = "zlib-1.2.12",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.11.tar.gz",
"https://zlib.net/zlib-1.2.11.tar.gz",
"https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.12.tar.gz",
"https://zlib.net/zlib-1.2.12.tar.gz",
],
)

Expand Down Expand Up @@ -114,10 +115,10 @@ pip_install()

http_archive(
name = "org_tensorflow",
sha256 = "66b953ae7fba61fd78969a2e24e350b26ec116cf2e6a7eb93d02c63939c6f9f7",
strip_prefix = "tensorflow-2.8.0",
sha256 = "8087cb0c529f04a4bfe480e49925cd64a904ad16d8ec66b98e2aacdfd53c80ff",
strip_prefix = "tensorflow-2.9.0",
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.8.0.tar.gz",
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.9.0.tar.gz",
],
)

Expand Down Expand Up @@ -157,16 +158,11 @@ http_archive(
http_archive(
name = "arrow",
build_file = "//third_party:arrow.BUILD",
patch_cmds = [
# TODO: Remove the fowllowing once arrow issue is resolved.
"""sed -i.bak 's/type_traits/std::max<int16_t>(sizeof(int16_t), type_traits/g' cpp/src/parquet/column_reader.cc""",
"""sed -i.bak 's/value_byte_size/value_byte_size)/g' cpp/src/parquet/column_reader.cc""",
],
sha256 = "a27971e2a71c412ae43d998b7b6d06201c7a3da382c804dcdc4a8126ccbabe67",
strip_prefix = "arrow-apache-arrow-4.0.0",
sha256 = "57e13c62f27b710e1de54fd30faed612aefa22aa41fa2c0c3bacd204dd18a8f3",
strip_prefix = "arrow-apache-arrow-7.0.0",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/apache/arrow/archive/apache-arrow-4.0.0.tar.gz",
"https://github.com/apache/arrow/archive/apache-arrow-4.0.0.tar.gz",
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/apache/arrow/archive/apache-arrow-7.0.0.tar.gz",
"https://github.com/apache/arrow/archive/apache-arrow-7.0.0.tar.gz",
],
)

Expand Down Expand Up @@ -601,10 +597,10 @@ http_archive(
patch_cmds = [
"tar -xzf c++/libs/libhdfspp/libhdfspp.tar.gz -C c++/libs/libhdfspp",
],
sha256 = "abdffe48b8d2e7776c3b541ee2241401e49774941ca4a8c759e5d795daec8a45",
strip_prefix = "orc-rel-release-1.6.7",
sha256 = "39d983f4c7feb8ea1e8ab8e3e53e9afc643282b7a500b3a93c91aa6490f65c17",
strip_prefix = "orc-rel-release-1.6.14",
urls = [
"https://github.com/apache/orc/archive/refs/tags/rel/release-1.6.7.tar.gz",
"https://github.com/apache/orc/archive/refs/tags/rel/release-1.6.14.tar.gz",
],
)

Expand Down Expand Up @@ -861,10 +857,10 @@ http_archive(
http_archive(
name = "xsimd",
build_file = "//third_party:xsimd.BUILD",
sha256 = "45337317c7f238fe0d64bb5d5418d264a427efc53400ddf8e6a964b6bcb31ce9",
strip_prefix = "xsimd-7.5.0",
sha256 = "21b4700e9ef70f6c9a86952047efd8272317df4e6fee35963de9394fd9c5677f",
strip_prefix = "xsimd-8.0.1",
urls = [
"https://github.com/xtensor-stack/xsimd/archive/refs/tags/7.5.0.tar.gz",
"https://github.com/xtensor-stack/xsimd/archive/refs/tags/8.0.1.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion tensorflow_io/core/filesystems/hdfs/hadoop_filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class LibHDFS {
if (TF_GetCode(status) == TF_OK) {
return;
} else {
TF_Log(TF_FATAL, "HadoopFileSystem load error: %s", TF_Message(status));
TF_Log(TF_ERROR, "HadoopFileSystem load error: %s", TF_Message(status));
}
}

Expand Down
2 changes: 1 addition & 1 deletion tensorflow_io/core/kernels/arrow/arrow_dataset_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ limitations under the License.
==============================================================================*/

#include "arrow/api.h"
#include "arrow/io/stdio.h"
#include "arrow/ipc/api.h"
#include "arrow/result.h"
#include "arrow/util/io_util.h"
#include "tensorflow/core/framework/dataset.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/public/version.h"
Expand Down
14 changes: 9 additions & 5 deletions tensorflow_io/core/kernels/json_kernels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,20 @@ class JSONReadable : public IOReadableInterface {

::arrow::Status status;

status = ::arrow::json::TableReader::Make(
auto reader_result = ::arrow::json::TableReader::Make(
::arrow::default_memory_pool(), json_file_,
::arrow::json::ReadOptions::Defaults(),
::arrow::json::ParseOptions::Defaults(), &reader_);
if (!status.ok()) {
::arrow::json::ParseOptions::Defaults());
if (!reader_result.ok()) {
return errors::InvalidArgument("unable to make a TableReader: ", status);
} else {
reader_ = reader_result.ValueOrDie();
}
status = reader_->Read(&table_);
if (!status.ok()) {
auto table_result = reader_->Read();
if (!table_result.ok()) {
return errors::InvalidArgument("unable to read table: ", status);
} else {
table_ = table_result.ValueOrDie();
}

shapes_.clear();
Expand Down
10 changes: 2 additions & 8 deletions tensorflow_io/core/kernels/mongodb_kernels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ class MongoDBReadableResource : public ResourceBase {
// Required to initialize libmongoc's internals
mongoc_init();

// Log the uri
LOG(INFO) << "Connecting to: " << uri;

// Create a MongoDB URI object from the given string

uri_obj_ = mongoc_uri_new_with_error(uri.c_str(), &error_);
Expand Down Expand Up @@ -128,7 +125,7 @@ class MongoDBReadableResource : public ResourceBase {
return errors::FailedPrecondition(
"Failed to ping the mongo cluster due to: ", error_.message);
}
LOG(ERROR) << "Ping Successful";
LOG(INFO) << "MongoDB connection ping successful";

return Status::OK();
}
Expand Down Expand Up @@ -222,9 +219,6 @@ class MongoDBWritableResource : public ResourceBase {
// Required to initialize libmongoc's internals
mongoc_init();

// Log the uri
LOG(INFO) << "Connecting to: " << uri;

// Create a MongoDB URI object from the given string

uri_obj_ = mongoc_uri_new_with_error(uri.c_str(), &error_);
Expand Down Expand Up @@ -308,7 +302,7 @@ class MongoDBWritableResource : public ResourceBase {
return errors::FailedPrecondition(
"Failed to ping the mongo cluster due to: ", error_.message);
}
LOG(INFO) << "Ping Successful";
LOG(INFO) << "MongoDB connection ping successful";

return Status::OK();
}
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_io/python/experimental/filter_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def pad(input, ksize, mode, constant_values):
input = tf.convert_to_tensor(input)
ksize = tf.convert_to_tensor(ksize)
mode = "CONSTANT" if mode is None else upper(mode)
mode = "CONSTANT" if mode is None else str.upper(mode)
constant_values = (
tf.zeros([], dtype=input.dtype)
if constant_values is None
Expand Down
4 changes: 2 additions & 2 deletions tensorflow_io/python/ops/version_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# ==============================================================================
"""version_ops"""

version = "0.24.0"
require = "tensorflow>=2.8.0,<2.9.0"
version = "0.26.0"
require = "tensorflow>=2.9.0,<2.10.0"
2 changes: 2 additions & 0 deletions third_party/arrow.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ cc_library(
"cpp/src/**/stream_to_file.cc",
"cpp/src/arrow/util/bpacking_avx2.cc",
"cpp/src/arrow/util/bpacking_avx512.cc",
"cpp/src/arrow/util/bpacking_neon.cc",
"cpp/src/arrow/util/tracing_internal.cc",
],
),
hdrs = [
Expand Down
3 changes: 2 additions & 1 deletion third_party/liborc.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ genrule(
srcs = ["c++/include/orc/orc-config.hh.in"],
outs = ["c++/include/orc/orc-config.hh"],
cmd = ("sed " +
"-e 's/@ORC_VERSION@/1.6.7/g' " +
"-e 's/@ORC_VERSION@/1.6.14/g' " +
"-e 's/cmakedefine/define/g' " +
"$< >$@"),
)
Expand All @@ -107,6 +107,7 @@ genrule(
"-e 's/cmakedefine HAS_PREAD/undef HAS_PREAD/g' " +
"-e 's/cmakedefine NEEDS_REDUNDANT_MOVE/undef NEEDS_REDUNDANT_MOVE/g' " +
"-e 's/cmakedefine NEEDS_Z_PREFIX/undef NEEDS_Z_PREFIX/g' " +
"-e 's/cmakedefine HAS_BUILTIN_OVERFLOW_CHECK/undef HAS_BUILTIN_OVERFLOW_CHECK/g' " +
"-e 's/cmakedefine/define/g' " +
"$< >$@"
),
Expand Down
2 changes: 2 additions & 0 deletions third_party/xsimd.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ cc_library(
hdrs = glob(
[
"include/xsimd/*.hpp",
"include/xsimd/arch/*.hpp",
"include/xsimd/arch/generic/*.hpp",
"include/xsimd/config/*.hpp",
"include/xsimd/math/*.hpp",
"include/xsimd/memory/*.hpp",
Expand Down
1 change: 1 addition & 0 deletions tools/release/note_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
).stdout.decode("utf-8")

authors = [e.split("\t")[1].strip() for e in logs.rstrip().split("\n")]
authors = list(filter(lambda e: e != "github-actions[bot]", authors))
# Replace " " with "@" to allow text wrap without break names, then replace back
authors = textwrap.fill(", ".join([e.replace(" ", "@") for e in authors]), 80).replace(
"@", " "
Expand Down

0 comments on commit 6746017

Please sign in to comment.