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

Function GetBoolValue

tensorflow/core/platform/cloud/gcs_file_system.cc:274–284  ·  view source on GitHub ↗

Reads a boolean JSON value with the given name from a parent JSON value.

Source from the content-addressed store, hash-verified

272
273/// Reads a boolean JSON value with the given name from a parent JSON value.
274Status GetBoolValue(const Json::Value& parent, const char* name, bool* result) {
275 Json::Value result_value;
276 TF_RETURN_IF_ERROR(GetValue(parent, name, &result_value));
277 if (!result_value.isBool()) {
278 return errors::Internal(
279 "The field '", name,
280 "' in the JSON response was expected to be a boolean.");
281 }
282 *result = result_value.asBool();
283 return Status::OK();
284}
285
286/// A GCS-based implementation of a random access file with an LRU block cache.
287class GcsRandomAccessFile : public RandomAccessFile {

Callers 1

RenameObjectMethod · 0.85

Calls 2

InternalFunction · 0.85
GetValueFunction · 0.70

Tested by

no test coverage detected