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

Method RetrieveLogs

tensorflow/core/distributed_runtime/session_mgr.cc:200–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void SessionMgr::RetrieveLogs(tensorflow::int64 step_id,
201 LoggingResponse* response) {
202 mutex_lock l(mu_);
203 // Legacy Session
204 if (legacy_session_) {
205 auto* worker_cache = legacy_session_->worker_cache.get();
206 if (worker_cache) {
207 auto step_stats = StepStats();
208 if (worker_cache->RetrieveLogs(step_id, &step_stats)) {
209 auto* labeled_step_stats = response->add_step();
210 labeled_step_stats->set_step_id(step_id);
211 labeled_step_stats->mutable_step_stats()->Swap(&step_stats);
212 }
213 }
214 }
215 for (const auto& session_kv : sessions_) {
216 auto session = session_kv.second.get();
217 if (session) {
218 auto* worker_cache = session->worker_cache.get();
219 if (worker_cache) {
220 auto step_stats = StepStats();
221 if (worker_cache->RetrieveLogs(step_id, &step_stats)) {
222 auto* labeled_step_stats = response->add_step();
223 labeled_step_stats->set_step_id(step_id);
224 labeled_step_stats->mutable_step_stats()->Swap(&step_stats);
225 }
226 }
227 }
228 }
229}
230
231void SessionMgr::ClearLogs() {
232 mutex_lock l(mu_);

Callers

nothing calls this directly

Calls 6

add_stepMethod · 0.80
set_step_idMethod · 0.80
mutable_step_statsMethod · 0.80
StepStatsClass · 0.70
getMethod · 0.45
SwapMethod · 0.45

Tested by

no test coverage detected