MCPcopy Create free account
hub / github.com/alibaba/zvec / train

Method train

src/core/algorithm/flat_sparse/flat_sparse_builder.cc:60–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60int FlatSparseBuilder::train(IndexThreads::Pointer,
61 IndexSparseHolder::Pointer /*holder*/) {
62 if (state_ != BUILD_STATE_INITED) {
63 LOG_ERROR("Init the builder before FlatSparseBuilder::train");
64 return IndexError_NoReady;
65 }
66
67 LOG_INFO("Begin FlatSparseBuilder::train");
68
69 stats_.set_trained_count(0UL);
70 stats_.set_trained_costtime(0UL);
71 state_ = BUILD_STATE_TRAINED;
72
73 LOG_INFO("End FlatSparseBuilder::train");
74
75 return 0;
76}
77
78int FlatSparseBuilder::train(const IndexTrainer::Pointer & /*trainer*/) {
79 if (state_ != BUILD_STATE_INITED) {

Callers

nothing calls this directly

Calls 2

set_trained_countMethod · 0.45
set_trained_costtimeMethod · 0.45

Tested by

no test coverage detected