Rename fastdeploy_runtime.h to runtime.h and Frontend to ModelFormat (#263)

rename frontend to model_format
This commit is contained in:
Jason
2022-09-22 13:24:05 +08:00
committed by GitHub
parent 9bebdaa915
commit e227c5625e
126 changed files with 400 additions and 380 deletions

View File

@@ -30,23 +30,24 @@ void BindUIE(pybind11::module& m) {
py::class_<text::UIEModel>(m, "UIEModel")
.def(py::init<std::string, std::string, std::string, float, size_t,
std::vector<std::string>, RuntimeOption, Frontend>(),
std::vector<std::string>, RuntimeOption, ModelFormat>(),
py::arg("model_file"), py::arg("params_file"), py::arg("vocab_file"),
py::arg("position_prob"), py::arg("max_length"), py::arg("schema"),
py::arg("custom_option") = fastdeploy::RuntimeOption(),
py::arg("model_format") = fastdeploy::Frontend::PADDLE)
py::arg("model_format") = fastdeploy::ModelFormat::PADDLE)
.def(
py::init<std::string, std::string, std::string, float, size_t,
std::vector<text::SchemaNode>, RuntimeOption, ModelFormat>(),
py::arg("model_file"), py::arg("params_file"), py::arg("vocab_file"),
py::arg("position_prob"), py::arg("max_length"), py::arg("schema"),
py::arg("custom_option") = fastdeploy::RuntimeOption(),
py::arg("model_format") = fastdeploy::ModelFormat::PADDLE)
.def(py::init<std::string, std::string, std::string, float, size_t,
std::vector<text::SchemaNode>, RuntimeOption, Frontend>(),
text::SchemaNode, RuntimeOption, ModelFormat>(),
py::arg("model_file"), py::arg("params_file"), py::arg("vocab_file"),
py::arg("position_prob"), py::arg("max_length"), py::arg("schema"),
py::arg("custom_option") = fastdeploy::RuntimeOption(),
py::arg("model_format") = fastdeploy::Frontend::PADDLE)
.def(py::init<std::string, std::string, std::string, float, size_t,
text::SchemaNode, RuntimeOption, Frontend>(),
py::arg("model_file"), py::arg("params_file"), py::arg("vocab_file"),
py::arg("position_prob"), py::arg("max_length"), py::arg("schema"),
py::arg("custom_option") = fastdeploy::RuntimeOption(),
py::arg("model_format") = fastdeploy::Frontend::PADDLE)
py::arg("model_format") = fastdeploy::ModelFormat::PADDLE)
.def("set_schema",
static_cast<void (text::UIEModel::*)(
const std::vector<std::string>&)>(&text::UIEModel::SetSchema),