MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / SaveModelProto

Function SaveModelProto

external/sentencepiece/src/sentencepiece_processor.cc:1156–1166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1154}
1155
1156util::Status SaveModelProto(absl::string_view filename,
1157 const ModelProto &model_proto) {
1158 if (filename.empty()) {
1159 return util::NotFoundError("model file path should not be empty.");
1160 }
1161 auto output = filesystem::NewWritableFile(filename, true);
1162 RETURN_IF_ERROR(output->status());
1163 CHECK_OR_RETURN(output->Write(model_proto.SerializeAsString()));
1164
1165 return util::OkStatus();
1166}
1167} // namespace io
1168} // namespace sentencepiece

Callers

nothing calls this directly

Calls 6

NewWritableFileFunction · 0.85
OkStatusFunction · 0.85
WriteMethod · 0.80
emptyMethod · 0.45
statusMethod · 0.45
SerializeAsStringMethod · 0.45

Tested by

no test coverage detected