MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Flush

Method Flush

tensorflow/python/lib/io/py_record_writer.cc:64–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void PyRecordWriter::Flush(TF_Status* out_status) {
65 if (writer_ == nullptr) {
66 TF_SetStatus(out_status, TF_FAILED_PRECONDITION,
67 "Writer not initialized or previously closed");
68 return;
69 }
70 Status s = writer_->Flush();
71 if (s.ok()) {
72 // Per the RecordWriter contract, flushing the RecordWriter does not
73 // flush the underlying file. Here we need to do both.
74 s = file_->Flush();
75 }
76 if (!s.ok()) {
77 Set_TF_Status_from_Status(out_status, s);
78 return;
79 }
80}
81
82void PyRecordWriter::Close(TF_Status* out_status) {
83 if (writer_ != nullptr) {

Callers 4

flushMethod · 0.45
flushMethod · 0.45
flushMethod · 0.45
runMethod · 0.45

Calls 3

TF_SetStatusFunction · 0.85
okMethod · 0.45

Tested by

no test coverage detected