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

Method CheckRunErrorStatus

tensorflow/cc/training/prefetch_runner.cc:146–162  ·  view source on GitHub ↗

Only Status Code is in `ignored_exceptions`, return `true`, otherwise return `false`.

Source from the content-addressed store, hash-verified

144/// Only Status Code is in `ignored_exceptions`, return `true`,
145/// otherwise return `false`.
146bool PrefetchRunner::CheckRunErrorStatus(Status& s) {
147 auto& closed_e = params_.closed_exceptions();
148 auto& ignored_e = params_.ignored_exceptions();
149 if (error::CANCELLED == s.code()) {
150 DealWithCancelledError();
151 return false;
152 } else if (std::count(closed_e.begin(), closed_e.end(), s.code()) != 0) {
153 DealWithClosedError();
154 return false;
155 } else if (std::count(ignored_e.begin(), ignored_e.end(), s.code()) != 0) {
156 DealWithIgnoredError(s);
157 return true;
158 }
159
160 DealWithCancelledUnexpectedError(s);
161 return false;
162}
163
164void PrefetchRunner::DealWithCancelledError() {
165 LOG(INFO) << "PrefetchRunner <" << name_ << "> Prefetching was cancelled.";

Callers

nothing calls this directly

Calls 4

countFunction · 0.85
codeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected