MCPcopy Create free account
hub / github.com/catboost/catboost / LoadPoolMetainfo

Method LoadPoolMetainfo

catboost/private/libs/quantized_pool/serialization.cpp:857–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857NCB::NIdl::TPoolMetainfo NCB::LoadPoolMetainfo(const TStringBuf path) {
858 const auto file = TBlob::FromFile(TString(path));
859 const TConstArrayRef<ui8> blob(file.AsUnsignedCharPtr(), file.Size());
860 TPoolMetainfo poolMetainfo;
861 auto parseMetainfo = [&] (TConstArrayRef<ui8> bytes) {
862 const auto poolMetainfoParsed = poolMetainfo.ParseFromArray(bytes.data(), bytes.size());
863 CB_ENSURE(poolMetainfoParsed);
864 };
865 ParseQuantizedPool(
866 parseMetainfo,
867 /*parseSchema*/ Nothing(),
868 /*parseColumn*/ Nothing(),
869 /*parseChunk*/ Nothing(),
870 blob);
871 return poolMetainfo;
872}
873
874
875namespace NCB {

Callers

nothing calls this directly

Calls 7

ParseQuantizedPoolFunction · 0.85
NothingFunction · 0.85
AsUnsignedCharPtrMethod · 0.80
SizeMethod · 0.45
ParseFromArrayMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected