Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ jobs:

windows-bazel:
name: Bazel Windows
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- uses: egor-tensin/vs-shell@v2
Expand Down Expand Up @@ -449,7 +449,7 @@ jobs:
release:
name: Release
if: github.event_name == 'push'
needs: [linux-wheel, macos-wheel, windows-wheel]
needs: [linux-wheel, macos-wheel] #, windows-wheel]
runs-on: ubuntu-18.04
steps:
- uses: actions/download-artifact@v1
Expand Down Expand Up @@ -492,26 +492,26 @@ jobs:
with:
name: Linux-3.11-wheel
path: Linux-3.11-wheel
- uses: actions/download-artifact@v1
with:
name: Windows-3.7-wheel
path: Windows-3.7-wheel
- uses: actions/download-artifact@v1
with:
name: Windows-3.8-wheel
path: Windows-3.8-wheel
- uses: actions/download-artifact@v1
with:
name: Windows-3.9-wheel
path: Windows-3.9-wheel
- uses: actions/download-artifact@v1
with:
name: Windows-3.10-wheel
path: Windows-3.10-wheel
- uses: actions/download-artifact@v1
with:
name: Windows-3.11-wheel
path: Windows-3.11-wheel
#- uses: actions/download-artifact@v1
# with:
# name: Windows-3.7-wheel
# path: Windows-3.7-wheel
#- uses: actions/download-artifact@v1
# with:
# name: Windows-3.8-wheel
# path: Windows-3.8-wheel
#- uses: actions/download-artifact@v1
# with:
# name: Windows-3.9-wheel
# path: Windows-3.9-wheel
#- uses: actions/download-artifact@v1
# with:
# name: Windows-3.10-wheel
# path: Windows-3.10-wheel
#- uses: actions/download-artifact@v1
# with:
# name: Windows-3.11-wheel
# path: Windows-3.11-wheel
- run: |
set -e -x
mkdir -p wheelhouse
Expand All @@ -525,11 +525,11 @@ jobs:
cp Linux-3.9-wheel/*.whl wheelhouse/
cp Linux-3.10-wheel/*.whl wheelhouse/
cp Linux-3.11-wheel/*.whl wheelhouse/
cp Windows-3.7-wheel/*.whl wheelhouse/
cp Windows-3.8-wheel/*.whl wheelhouse/
cp Windows-3.9-wheel/*.whl wheelhouse/
cp Windows-3.10-wheel/*.whl wheelhouse/
cp Windows-3.11-wheel/*.whl wheelhouse/
# cp Windows-3.7-wheel/*.whl wheelhouse/
# cp Windows-3.8-wheel/*.whl wheelhouse/
# cp Windows-3.9-wheel/*.whl wheelhouse/
# cp Windows-3.10-wheel/*.whl wheelhouse/
# cp Windows-3.11-wheel/*.whl wheelhouse/
ls -la wheelhouse/
sha256sum wheelhouse/*.whl
- uses: actions/upload-artifact@v2
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ pip_install()

http_archive(
name = "org_tensorflow",
sha256 = "99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48",
strip_prefix = "tensorflow-2.11.0",
sha256 = "1aee7a62742aae80bb94fcd83de49bf7317084ce64b24965967382ab082e5f52",
strip_prefix = "tensorflow-2.12.0-rc1",
urls = [
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.11.0.tar.gz",
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.12.0-rc1.tar.gz",
],
)

Expand Down
1 change: 1 addition & 0 deletions tensorflow_io/core/filesystems/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cc_library(
linkstatic = True,
deps = [
"@local_config_tf//:tf_c_header_lib",
"@local_config_tf//:tf_tsl_header_lib",
],
alwayslink = 1,
)
Expand Down
8 changes: 4 additions & 4 deletions tensorflow_io/core/filesystems/az/az_filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bool GetTmpFilename(std::string* filename) {
}
#endif
*filename = buffer;
// return Status::OK();
// return OkStatus();
return true;
}

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

return Status::OK();
return OkStatus();
}
#endif

Expand Down Expand Up @@ -876,7 +876,7 @@ static bool IsDirectory(const TF_Filesystem* filesystem, const char* path,
// bool is_account;

// TF_RETURN_IF_ERROR(AccountExists(account, &is_account, blob_client));
// return is_account ? Status::OK()
// return is_account ? OkStatus()
// : errors::NotFound("The specified account az://",
// account, " was not found.");
}
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_io/core/filesystems/http/http_filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ class HTTPRandomAccessFile {
~HTTPRandomAccessFile() {}
int64_t Read(uint64_t offset, size_t n, char* buffer,
TF_Status* status) const {
// If n == 0, then return Status::OK()
// If n == 0, then return OkStatus()
// otherwise, if bytes_read < n then return OutofRange
if (n == 0) {
TF_SetStatus(status, TF_OK, "");
Expand Down
54 changes: 27 additions & 27 deletions tensorflow_io/core/filesystems/oss/oss_filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Status oss_initialize() {
return errors::Internal("can not init OSS connection");
}

return Status::OK();
return OkStatus();
}

void oss_error_message(aos_status_s* status, std::string* msg) {
Expand Down Expand Up @@ -195,7 +195,7 @@ class OSSRandomAccessFile : public RandomAccessFile {
" bytes were read out of ", n,
" bytes requested.");
}
return Status::OK();
return OkStatus();
}

private:
Expand Down Expand Up @@ -251,7 +251,7 @@ class OSSRandomAccessFile : public RandomAccessFile {
pos += size;
}
buffer_size_ = pos;
return Status::OK();
return OkStatus();
} else {
string msg;
oss_error_message(s, &msg);
Expand Down Expand Up @@ -316,7 +316,7 @@ class OSSWritableFile : public WritableFile {
aos_buf_t* tmp_buf = aos_create_buf(pool_, data.size() + 1);
aos_buf_append_string(pool_, tmp_buf, data.data(), data.size());
aos_list_add_tail(&tmp_buf->node, &buffer_);
return Status::OK();
return OkStatus();
}

Status Close() override {
Expand Down Expand Up @@ -369,7 +369,7 @@ class OSSWritableFile : public WritableFile {
}

is_closed_ = true;
return Status::OK();
return OkStatus();
}

Status Flush() override {
Expand All @@ -380,7 +380,7 @@ class OSSWritableFile : public WritableFile {
TF_RETURN_IF_ERROR(_FlushInternal());
}

return Status::OK();
return OkStatus();
}

Status Sync() override { return Flush(); }
Expand Down Expand Up @@ -434,7 +434,7 @@ class OSSWritableFile : public WritableFile {
upload_id_ = uploadId.data;
}

return Status::OK();
return OkStatus();
}

Status _FlushInternal() {
Expand Down Expand Up @@ -463,7 +463,7 @@ class OSSWritableFile : public WritableFile {
ReleaseAprPool();
InitAprPool();
}
return Status::OK();
return OkStatus();
}

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

return Status::OK();
return OkStatus();
}

std::string shost;
Expand Down Expand Up @@ -564,7 +564,7 @@ Status OSSFileSystem::_ParseOSSURIPath(const StringPiece fname,
VLOG(1) << "bucket: " << bucket << ",access_id: " << access_id
<< ",access_key: " << access_key << ",host: " << host;

return Status::OK();
return OkStatus();
}

Status OSSFileSystem::NewRandomAccessFile(
Expand All @@ -581,7 +581,7 @@ Status OSSFileSystem::NewRandomAccessFile(
result->reset(new OSSRandomAccessFile(host, access_id, access_key, bucket,
object, read_ahead_bytes_,
stat.length));
return Status::OK();
return OkStatus();
}

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

result->reset(new OSSWritableFile(host, access_id, access_key, bucket, object,
upload_part_bytes_));
return Status::OK();
return OkStatus();
}

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

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

Status OSSFileSystem::FileExists(const std::string& fname) {
TF_FileStatistics stat;
if (Stat(fname, &stat).ok()) {
return Status::OK();
return OkStatus();
} else {
return errors::NotFound(fname, " does not exists");
}
Expand Down Expand Up @@ -713,7 +713,7 @@ Status OSSFileSystem::_ListObjects(
aos_list_init(&params->common_prefix_list);
} while (params->truncated == AOS_TRUE && return_all);

return Status::OK();
return OkStatus();
}

Status OSSFileSystem::_StatInternal(aos_pool_t* pool,
Expand Down Expand Up @@ -743,7 +743,7 @@ Status OSSFileSystem::_StatInternal(aos_pool_t* pool,
s = _ListObjects(pool, options, bucket, object, &listing, true, false, false,
true, 10);

if (s == Status::OK() && !listing.empty()) {
if (s == OkStatus() && !listing.empty()) {
if (str_util::EndsWith(object, "/")) {
stat->is_directory = true;
}
Expand Down Expand Up @@ -773,7 +773,7 @@ Status OSSFileSystem::_RetrieveObjectMetadata(
if (object.empty()) { // root always exists
stat->is_directory = true;
stat->length = 0;
return Status::OK();
return OkStatus();
}

aos_str_set(&oss_bucket, bucket.c_str());
Expand Down Expand Up @@ -811,7 +811,7 @@ Status OSSFileSystem::_RetrieveObjectMetadata(
stat->is_directory = false;
}

return Status::OK();
return OkStatus();
} else {
string msg;
oss_error_message(status, &msg);
Expand Down Expand Up @@ -869,7 +869,7 @@ Status OSSFileSystem::_DeleteObjectInternal(
return errors::Internal("delete failed: ", object, " errMsg: ", msg);
}

return Status::OK();
return OkStatus();
}

Status OSSFileSystem::DeleteFile(const std::string& fname) {
Expand Down Expand Up @@ -915,7 +915,7 @@ Status OSSFileSystem::CreateDir(const std::string& dirname) {
}

TF_RETURN_IF_ERROR(_CreateDirInternal(pool, ossOptions, bucket, object));
return Status::OK();
return OkStatus();
}

Status OSSFileSystem::RecursivelyCreateDir(const string& dirname) {
Expand Down Expand Up @@ -946,7 +946,7 @@ Status OSSFileSystem::RecursivelyCreateDir(const string& dirname) {
}
}

return Status::OK();
return OkStatus();
}

Status OSSFileSystem::_CreateDirInternal(aos_pool_t* pool,
Expand All @@ -960,7 +960,7 @@ Status OSSFileSystem::_CreateDirInternal(aos_pool_t* pool,
return errors::AlreadyExists("object already exists as a file: ",
dirname);
} else {
return Status::OK();
return OkStatus();
}
}
std::string object = dirname;
Expand Down Expand Up @@ -988,7 +988,7 @@ Status OSSFileSystem::_CreateDirInternal(aos_pool_t* pool,
&resp_headers);

if (aos_status_is_ok(s)) {
return Status::OK();
return OkStatus();
} else {
string msg;
oss_error_message(s, &msg);
Expand Down Expand Up @@ -1029,7 +1029,7 @@ Status OSSFileSystem::GetFileSize(const std::string& fname, uint64* file_size) {
TF_FileStatistics stat;
TF_RETURN_IF_ERROR(Stat(fname, &stat));
*file_size = stat.length;
return Status::OK();
return OkStatus();
}

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

return stat.is_directory
? Status::OK()
? OkStatus()
: errors::FailedPrecondition(fname + " is not a directory");
}

Expand Down Expand Up @@ -1298,7 +1298,7 @@ Status OSSFileSystem::DeleteRecursively(const std::string& dirname,
return _DeleteObjectInternal(oss_options, bucket, object.append(kDelim));
}
}
return Status::OK();
return OkStatus();
}

Status OSSFileSystem::CopyFile(const string& src, const string& target) {
Expand Down Expand Up @@ -1345,7 +1345,7 @@ Status OSSFileSystem::CopyFile(const string& src, const string& target) {
return errors::Internal("copy ", src, " to ", target,
" failed, errMsg: ", msg);
}
return Status::OK();
return OkStatus();
}

void ToTF_Status(const ::tensorflow::Status& s, TF_Status* status) {
Expand Down
Loading