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

Method SessionLogger

tensorflow/python/client/session_ref.cc:94–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92class SessionLogger {
93 public:
94 SessionLogger() {
95 std::string log_name = getenv("TF_REPLAY_LOG_FILE");
96 LOG(INFO) << "Constructing new session logger for " << log_name;
97 TF_CHECK_OK(
98 Env::Default()->RecursivelyCreateDir(string(io::Dirname(log_name))));
99 Env::Default()->DeleteFile(log_name).IgnoreError();
100
101 TF_CHECK_OK(Env::Default()->NewWritableFile(log_name, &log_file_));
102 log_writer_ = absl::make_unique<io::RecordWriter>(log_file_.get());
103 }
104
105 ~SessionLogger() {
106 log_writer_->Close().IgnoreError();

Callers

nothing calls this directly

Calls 7

DefaultFunction · 0.85
DirnameFunction · 0.85
RecursivelyCreateDirMethod · 0.45
IgnoreErrorMethod · 0.45
DeleteFileMethod · 0.45
NewWritableFileMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected