Skip to content

Commit 51941dd

Browse files
authored
Bump to TF 2.12.0 rc0 (#1775)
* Bump to TF 2.12.0 rc0 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Try Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Change to OkStatus Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Use tsl for block cache Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix Status::OK Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * ValueOrDie Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix again Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Additional nucleus patch Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Windows-2022 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Lint fix Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Github actions Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Try Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Try with ??_7Metadata@data@tensorflow@@6b@ Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Try2 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Bump to 2.12.0rc1 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Disable windows build for now Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix lint Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Fix lint issue Signed-off-by: Yong Tang <yong.tang.github@outlook.com> --------- Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
1 parent fee652a commit 51941dd

File tree

112 files changed

+736
-616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+736
-616
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ jobs:
318318
319319
windows-bazel:
320320
name: Bazel Windows
321-
runs-on: windows-2019
321+
runs-on: windows-2022
322322
steps:
323323
- uses: actions/checkout@v2
324324
- uses: egor-tensin/vs-shell@v2
@@ -449,7 +449,7 @@ jobs:
449449
release:
450450
name: Release
451451
if: github.event_name == 'push'
452-
needs: [linux-wheel, macos-wheel, windows-wheel]
452+
needs: [linux-wheel, macos-wheel] #, windows-wheel]
453453
runs-on: ubuntu-18.04
454454
steps:
455455
- uses: actions/download-artifact@v1
@@ -492,26 +492,26 @@ jobs:
492492
with:
493493
name: Linux-3.11-wheel
494494
path: Linux-3.11-wheel
495-
- uses: actions/download-artifact@v1
496-
with:
497-
name: Windows-3.7-wheel
498-
path: Windows-3.7-wheel
499-
- uses: actions/download-artifact@v1
500-
with:
501-
name: Windows-3.8-wheel
502-
path: Windows-3.8-wheel
503-
- uses: actions/download-artifact@v1
504-
with:
505-
name: Windows-3.9-wheel
506-
path: Windows-3.9-wheel
507-
- uses: actions/download-artifact@v1
508-
with:
509-
name: Windows-3.10-wheel
510-
path: Windows-3.10-wheel
511-
- uses: actions/download-artifact@v1
512-
with:
513-
name: Windows-3.11-wheel
514-
path: Windows-3.11-wheel
495+
#- uses: actions/download-artifact@v1
496+
# with:
497+
# name: Windows-3.7-wheel
498+
# path: Windows-3.7-wheel
499+
#- uses: actions/download-artifact@v1
500+
# with:
501+
# name: Windows-3.8-wheel
502+
# path: Windows-3.8-wheel
503+
#- uses: actions/download-artifact@v1
504+
# with:
505+
# name: Windows-3.9-wheel
506+
# path: Windows-3.9-wheel
507+
#- uses: actions/download-artifact@v1
508+
# with:
509+
# name: Windows-3.10-wheel
510+
# path: Windows-3.10-wheel
511+
#- uses: actions/download-artifact@v1
512+
# with:
513+
# name: Windows-3.11-wheel
514+
# path: Windows-3.11-wheel
515515
- run: |
516516
set -e -x
517517
mkdir -p wheelhouse
@@ -525,11 +525,11 @@ jobs:
525525
cp Linux-3.9-wheel/*.whl wheelhouse/
526526
cp Linux-3.10-wheel/*.whl wheelhouse/
527527
cp Linux-3.11-wheel/*.whl wheelhouse/
528-
cp Windows-3.7-wheel/*.whl wheelhouse/
529-
cp Windows-3.8-wheel/*.whl wheelhouse/
530-
cp Windows-3.9-wheel/*.whl wheelhouse/
531-
cp Windows-3.10-wheel/*.whl wheelhouse/
532-
cp Windows-3.11-wheel/*.whl wheelhouse/
528+
# cp Windows-3.7-wheel/*.whl wheelhouse/
529+
# cp Windows-3.8-wheel/*.whl wheelhouse/
530+
# cp Windows-3.9-wheel/*.whl wheelhouse/
531+
# cp Windows-3.10-wheel/*.whl wheelhouse/
532+
# cp Windows-3.11-wheel/*.whl wheelhouse/
533533
ls -la wheelhouse/
534534
sha256sum wheelhouse/*.whl
535535
- uses: actions/upload-artifact@v2

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ pip_install()
115115

116116
http_archive(
117117
name = "org_tensorflow",
118-
sha256 = "99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48",
119-
strip_prefix = "tensorflow-2.11.0",
118+
sha256 = "1aee7a62742aae80bb94fcd83de49bf7317084ce64b24965967382ab082e5f52",
119+
strip_prefix = "tensorflow-2.12.0-rc1",
120120
urls = [
121-
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.11.0.tar.gz",
121+
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0-rc1.tar.gz",
122122
],
123123
)
124124

tensorflow_io/core/filesystems/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ cc_library(
2323
linkstatic = True,
2424
deps = [
2525
"@local_config_tf//:tf_c_header_lib",
26+
"@local_config_tf//:tf_tsl_header_lib",
2627
],
2728
alwayslink = 1,
2829
)

tensorflow_io/core/filesystems/az/az_filesystem.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bool GetTmpFilename(std::string* filename) {
5959
}
6060
#endif
6161
*filename = buffer;
62-
// return Status::OK();
62+
// return OkStatus();
6363
return true;
6464
}
6565

@@ -271,7 +271,7 @@ class AzBlobRandomAccessFile {
271271
TF_Status* status) const {
272272
TF_VLog(1, "ReadFileFromAz az://%s/%s/%s from %u for n: %u\n",
273273
account_.c_str(), container_.c_str(), object_.c_str(), offset, n);
274-
// If n == 0, then return Status::OK()
274+
// If n == 0, then return OkStatus()
275275
// otherwise, if bytes_read < n then return OutofRange
276276
if (n == 0) {
277277
TF_SetStatus(status, TF_OK, "");
@@ -457,7 +457,7 @@ Status GetMatchingPaths(const std::string& pattern, std::vector<std::string>* re
457457
return Env::Default()->MatchPath(full_path, pattern);
458458
});
459459

460-
return Status::OK();
460+
return OkStatus();
461461
}
462462
#endif
463463

@@ -876,7 +876,7 @@ static bool IsDirectory(const TF_Filesystem* filesystem, const char* path,
876876
// bool is_account;
877877

878878
// TF_RETURN_IF_ERROR(AccountExists(account, &is_account, blob_client));
879-
// return is_account ? Status::OK()
879+
// return is_account ? OkStatus()
880880
// : errors::NotFound("The specified account az://",
881881
// account, " was not found.");
882882
}

tensorflow_io/core/filesystems/http/http_filesystem.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ class HTTPRandomAccessFile {
549549
~HTTPRandomAccessFile() {}
550550
int64_t Read(uint64_t offset, size_t n, char* buffer,
551551
TF_Status* status) const {
552-
// If n == 0, then return Status::OK()
552+
// If n == 0, then return OkStatus()
553553
// otherwise, if bytes_read < n then return OutofRange
554554
if (n == 0) {
555555
TF_SetStatus(status, TF_OK, "");

tensorflow_io/core/filesystems/oss/oss_filesystem.cc

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Status oss_initialize() {
7070
return errors::Internal("can not init OSS connection");
7171
}
7272

73-
return Status::OK();
73+
return OkStatus();
7474
}
7575

7676
void oss_error_message(aos_status_s* status, std::string* msg) {
@@ -195,7 +195,7 @@ class OSSRandomAccessFile : public RandomAccessFile {
195195
" bytes were read out of ", n,
196196
" bytes requested.");
197197
}
198-
return Status::OK();
198+
return OkStatus();
199199
}
200200

201201
private:
@@ -251,7 +251,7 @@ class OSSRandomAccessFile : public RandomAccessFile {
251251
pos += size;
252252
}
253253
buffer_size_ = pos;
254-
return Status::OK();
254+
return OkStatus();
255255
} else {
256256
string msg;
257257
oss_error_message(s, &msg);
@@ -316,7 +316,7 @@ class OSSWritableFile : public WritableFile {
316316
aos_buf_t* tmp_buf = aos_create_buf(pool_, data.size() + 1);
317317
aos_buf_append_string(pool_, tmp_buf, data.data(), data.size());
318318
aos_list_add_tail(&tmp_buf->node, &buffer_);
319-
return Status::OK();
319+
return OkStatus();
320320
}
321321

322322
Status Close() override {
@@ -369,7 +369,7 @@ class OSSWritableFile : public WritableFile {
369369
}
370370

371371
is_closed_ = true;
372-
return Status::OK();
372+
return OkStatus();
373373
}
374374

375375
Status Flush() override {
@@ -380,7 +380,7 @@ class OSSWritableFile : public WritableFile {
380380
TF_RETURN_IF_ERROR(_FlushInternal());
381381
}
382382

383-
return Status::OK();
383+
return OkStatus();
384384
}
385385

386386
Status Sync() override { return Flush(); }
@@ -434,7 +434,7 @@ class OSSWritableFile : public WritableFile {
434434
upload_id_ = uploadId.data;
435435
}
436436

437-
return Status::OK();
437+
return OkStatus();
438438
}
439439

440440
Status _FlushInternal() {
@@ -463,7 +463,7 @@ class OSSWritableFile : public WritableFile {
463463
ReleaseAprPool();
464464
InitAprPool();
465465
}
466-
return Status::OK();
466+
return OkStatus();
467467
}
468468

469469
const size_t CurrentBufferLength() { return aos_buf_list_len(&buffer_); }
@@ -473,7 +473,7 @@ class OSSWritableFile : public WritableFile {
473473
return errors::Internal("Already closed.");
474474
}
475475

476-
return Status::OK();
476+
return OkStatus();
477477
}
478478

479479
std::string shost;
@@ -564,7 +564,7 @@ Status OSSFileSystem::_ParseOSSURIPath(const StringPiece fname,
564564
VLOG(1) << "bucket: " << bucket << ",access_id: " << access_id
565565
<< ",access_key: " << access_key << ",host: " << host;
566566

567-
return Status::OK();
567+
return OkStatus();
568568
}
569569

570570
Status OSSFileSystem::NewRandomAccessFile(
@@ -581,7 +581,7 @@ Status OSSFileSystem::NewRandomAccessFile(
581581
result->reset(new OSSRandomAccessFile(host, access_id, access_key, bucket,
582582
object, read_ahead_bytes_,
583583
stat.length));
584-
return Status::OK();
584+
return OkStatus();
585585
}
586586

587587
Status OSSFileSystem::NewWritableFile(const std::string& fname,
@@ -594,7 +594,7 @@ Status OSSFileSystem::NewWritableFile(const std::string& fname,
594594

595595
result->reset(new OSSWritableFile(host, access_id, access_key, bucket, object,
596596
upload_part_bytes_));
597-
return Status::OK();
597+
return OkStatus();
598598
}
599599

600600
Status OSSFileSystem::NewAppendableFile(const std::string& fname,
@@ -617,13 +617,13 @@ Status OSSFileSystem::NewReadOnlyMemoryRegionFromFile(
617617
TF_RETURN_IF_ERROR(file->Read(0, size, &piece, data.get()));
618618

619619
result->reset(new OSSReadOnlyMemoryRegion(std::move(data), size));
620-
return Status::OK();
620+
return OkStatus();
621621
}
622622

623623
Status OSSFileSystem::FileExists(const std::string& fname) {
624624
TF_FileStatistics stat;
625625
if (Stat(fname, &stat).ok()) {
626-
return Status::OK();
626+
return OkStatus();
627627
} else {
628628
return errors::NotFound(fname, " does not exists");
629629
}
@@ -713,7 +713,7 @@ Status OSSFileSystem::_ListObjects(
713713
aos_list_init(&params->common_prefix_list);
714714
} while (params->truncated == AOS_TRUE && return_all);
715715

716-
return Status::OK();
716+
return OkStatus();
717717
}
718718

719719
Status OSSFileSystem::_StatInternal(aos_pool_t* pool,
@@ -743,7 +743,7 @@ Status OSSFileSystem::_StatInternal(aos_pool_t* pool,
743743
s = _ListObjects(pool, options, bucket, object, &listing, true, false, false,
744744
true, 10);
745745

746-
if (s == Status::OK() && !listing.empty()) {
746+
if (s == OkStatus() && !listing.empty()) {
747747
if (str_util::EndsWith(object, "/")) {
748748
stat->is_directory = true;
749749
}
@@ -773,7 +773,7 @@ Status OSSFileSystem::_RetrieveObjectMetadata(
773773
if (object.empty()) { // root always exists
774774
stat->is_directory = true;
775775
stat->length = 0;
776-
return Status::OK();
776+
return OkStatus();
777777
}
778778

779779
aos_str_set(&oss_bucket, bucket.c_str());
@@ -811,7 +811,7 @@ Status OSSFileSystem::_RetrieveObjectMetadata(
811811
stat->is_directory = false;
812812
}
813813

814-
return Status::OK();
814+
return OkStatus();
815815
} else {
816816
string msg;
817817
oss_error_message(status, &msg);
@@ -869,7 +869,7 @@ Status OSSFileSystem::_DeleteObjectInternal(
869869
return errors::Internal("delete failed: ", object, " errMsg: ", msg);
870870
}
871871

872-
return Status::OK();
872+
return OkStatus();
873873
}
874874

875875
Status OSSFileSystem::DeleteFile(const std::string& fname) {
@@ -915,7 +915,7 @@ Status OSSFileSystem::CreateDir(const std::string& dirname) {
915915
}
916916

917917
TF_RETURN_IF_ERROR(_CreateDirInternal(pool, ossOptions, bucket, object));
918-
return Status::OK();
918+
return OkStatus();
919919
}
920920

921921
Status OSSFileSystem::RecursivelyCreateDir(const string& dirname) {
@@ -946,7 +946,7 @@ Status OSSFileSystem::RecursivelyCreateDir(const string& dirname) {
946946
}
947947
}
948948

949-
return Status::OK();
949+
return OkStatus();
950950
}
951951

952952
Status OSSFileSystem::_CreateDirInternal(aos_pool_t* pool,
@@ -960,7 +960,7 @@ Status OSSFileSystem::_CreateDirInternal(aos_pool_t* pool,
960960
return errors::AlreadyExists("object already exists as a file: ",
961961
dirname);
962962
} else {
963-
return Status::OK();
963+
return OkStatus();
964964
}
965965
}
966966
std::string object = dirname;
@@ -988,7 +988,7 @@ Status OSSFileSystem::_CreateDirInternal(aos_pool_t* pool,
988988
&resp_headers);
989989

990990
if (aos_status_is_ok(s)) {
991-
return Status::OK();
991+
return OkStatus();
992992
} else {
993993
string msg;
994994
oss_error_message(s, &msg);
@@ -1029,7 +1029,7 @@ Status OSSFileSystem::GetFileSize(const std::string& fname, uint64* file_size) {
10291029
TF_FileStatistics stat;
10301030
TF_RETURN_IF_ERROR(Stat(fname, &stat));
10311031
*file_size = stat.length;
1032-
return Status::OK();
1032+
return OkStatus();
10331033
}
10341034

10351035
Status OSSFileSystem::RenameFile(const std::string& src,
@@ -1237,7 +1237,7 @@ Status OSSFileSystem::IsDirectory(const std::string& fname) {
12371237
TF_RETURN_IF_ERROR(Stat(fname, &stat));
12381238

12391239
return stat.is_directory
1240-
? Status::OK()
1240+
? OkStatus()
12411241
: errors::FailedPrecondition(fname + " is not a directory");
12421242
}
12431243

@@ -1298,7 +1298,7 @@ Status OSSFileSystem::DeleteRecursively(const std::string& dirname,
12981298
return _DeleteObjectInternal(oss_options, bucket, object.append(kDelim));
12991299
}
13001300
}
1301-
return Status::OK();
1301+
return OkStatus();
13021302
}
13031303

13041304
Status OSSFileSystem::CopyFile(const string& src, const string& target) {
@@ -1345,7 +1345,7 @@ Status OSSFileSystem::CopyFile(const string& src, const string& target) {
13451345
return errors::Internal("copy ", src, " to ", target,
13461346
" failed, errMsg: ", msg);
13471347
}
1348-
return Status::OK();
1348+
return OkStatus();
13491349
}
13501350

13511351
void ToTF_Status(const ::tensorflow::Status& s, TF_Status* status) {

0 commit comments

Comments
 (0)