提交 20d435b1 编写于 作者: S seiriosPlus

add large scale size method for pybind

上级 1facefb4
......@@ -109,10 +109,15 @@ void BindLargeScaleKV(py::module* m) {
auto* sparse_variable = self.Get(table_name);
sparse_variable->Load(dir);
})
.def("save", [](LargeScaleKV& self, const std::string& table_name,
const std::string& dir) {
.def("save",
[](LargeScaleKV& self, const std::string& table_name,
const std::string& dir) {
auto* sparse_variable = self.Get(table_name);
sparse_variable->Save(dir);
})
.def("size", [](LargeScaleKV& self, const std::string& table_name) {
auto* sparse_variable = self.Get(table_name);
sparse_variable->Save(dir);
return sparse_variable->Size();
});
}
} // namespace pybind
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册