mirror of https://github.com/milvus-io/milvus.git
Merge branch 'be_stable' into 'branch-0.3.1-xiaojun'
MS-240 add Log See merge request megasearch/milvus!228 Former-commit-id: cdb0b9095df2586342301ee3675808fe322e6174pull/191/head
commit
eaca1381ee
|
@ -388,6 +388,7 @@ Status DBMetaImpl::CreateTableFile(TableFileSchema &file_schema) {
|
||||||
file_schema.created_on_ = utils::GetMicroSecTimeStamp();
|
file_schema.created_on_ = utils::GetMicroSecTimeStamp();
|
||||||
file_schema.updated_time_ = file_schema.created_on_;
|
file_schema.updated_time_ = file_schema.created_on_;
|
||||||
file_schema.engine_type_ = table_schema.engine_type_;
|
file_schema.engine_type_ = table_schema.engine_type_;
|
||||||
|
ENGINE_LOG_DEBUG << "CreateTableFile EngineTypee: " << table_schema.engine_type_;
|
||||||
GetTableFilePath(file_schema);
|
GetTableFilePath(file_schema);
|
||||||
|
|
||||||
auto id = ConnectorPtr->insert(file_schema);
|
auto id = ConnectorPtr->insert(file_schema);
|
||||||
|
|
|
@ -53,6 +53,7 @@ EngineFactory::Build(uint16_t dimension,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENGINE_LOG_DEBUG << "EngineFactory EngineTypee: " << int(type);
|
||||||
ExecutionEnginePtr execution_engine_ptr =
|
ExecutionEnginePtr execution_engine_ptr =
|
||||||
std::make_shared<ExecutionEngineImpl>(dimension, location, type);
|
std::make_shared<ExecutionEngineImpl>(dimension, location, type);
|
||||||
|
|
||||||
|
|
|
@ -37,17 +37,14 @@ VecIndexPtr ExecutionEngineImpl::CreatetVecIndex(EngineType type) {
|
||||||
std::shared_ptr<VecIndex> index;
|
std::shared_ptr<VecIndex> index;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case EngineType::FAISS_IDMAP: {
|
case EngineType::FAISS_IDMAP: {
|
||||||
ENGINE_LOG_DEBUG << "Build Index: IDMAP";
|
|
||||||
index = GetVecIndexFactory(IndexType::FAISS_IDMAP);
|
index = GetVecIndexFactory(IndexType::FAISS_IDMAP);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EngineType::FAISS_IVFFLAT_GPU: {
|
case EngineType::FAISS_IVFFLAT_GPU: {
|
||||||
ENGINE_LOG_DEBUG << "Build Index: IVFMIX";
|
|
||||||
index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_MIX);
|
index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_MIX);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EngineType::FAISS_IVFFLAT_CPU: {
|
case EngineType::FAISS_IVFFLAT_CPU: {
|
||||||
ENGINE_LOG_DEBUG << "Build Index: IVFCPU";
|
|
||||||
index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_CPU);
|
index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_CPU);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -137,6 +134,7 @@ ExecutionEngineImpl::BuildIndex(const std::string &location) {
|
||||||
ENGINE_LOG_DEBUG << "Build index file: " << location << " from: " << location_;
|
ENGINE_LOG_DEBUG << "Build index file: " << location << " from: " << location_;
|
||||||
|
|
||||||
auto from_index = std::dynamic_pointer_cast<BFIndex>(index_);
|
auto from_index = std::dynamic_pointer_cast<BFIndex>(index_);
|
||||||
|
ENGINE_LOG_DEBUG << "BuildIndex EngineTypee: " << int(build_type);
|
||||||
auto to_index = CreatetVecIndex(build_type);
|
auto to_index = CreatetVecIndex(build_type);
|
||||||
ENGINE_LOG_DEBUG << "Build Params: [gpu_id] " << gpu_num;
|
ENGINE_LOG_DEBUG << "Build Params: [gpu_id] " << gpu_num;
|
||||||
to_index->BuildAll(Count(),
|
to_index->BuildAll(Count(),
|
||||||
|
|
|
@ -155,6 +155,7 @@ ServerError CreateTableTask::OnExecute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
res = ValidateTableIndexType(schema_.index_type);
|
res = ValidateTableIndexType(schema_.index_type);
|
||||||
|
SERVER_LOG_DEBUG << "Createtbale EngineTypee: " << schema_.index_type;
|
||||||
if(res != SERVER_SUCCESS) {
|
if(res != SERVER_SUCCESS) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include "vec_impl.h"
|
#include "vec_impl.h"
|
||||||
#include "data_transfer.h"
|
#include "data_transfer.h"
|
||||||
|
#include "wrapper_log.h"
|
||||||
|
|
||||||
|
|
||||||
namespace zilliz {
|
namespace zilliz {
|
||||||
|
@ -138,6 +139,8 @@ void IVFMixIndex::BuildAll(const long &nb,
|
||||||
const Config &cfg,
|
const Config &cfg,
|
||||||
const long &nt,
|
const long &nt,
|
||||||
const float *xt) {
|
const float *xt) {
|
||||||
|
WRAPPER_LOG_DEBUG << "Get Into Build IVFMIX";
|
||||||
|
|
||||||
dim = cfg["dim"].as<int>();
|
dim = cfg["dim"].as<int>();
|
||||||
auto dataset = GenDatasetWithIds(nb, dim, xb, ids);
|
auto dataset = GenDatasetWithIds(nb, dim, xb, ids);
|
||||||
|
|
||||||
|
@ -153,7 +156,7 @@ void IVFMixIndex::BuildAll(const long &nb,
|
||||||
auto host_index = device_index->Copy_index_gpu_to_cpu();
|
auto host_index = device_index->Copy_index_gpu_to_cpu();
|
||||||
index_ = host_index;
|
index_ = host_index;
|
||||||
} else {
|
} else {
|
||||||
// TODO(linxj): LOG ERROR
|
WRAPPER_LOG_ERROR << "Build IVFMIXIndex Failed";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
|
||||||
|
// Unauthorized copying of this file, via any medium is strictly prohibited.
|
||||||
|
// Proprietary and confidential.
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <easylogging++.h>
|
||||||
|
|
||||||
|
namespace zilliz {
|
||||||
|
namespace milvus {
|
||||||
|
namespace engine {
|
||||||
|
|
||||||
|
#define WRAPPER_DOMAIN_NAME "[WRAPPER] "
|
||||||
|
#define WRAPPER_ERROR_TEXT "WRAPPER Error:"
|
||||||
|
|
||||||
|
#define WRAPPER_LOG_TRACE LOG(TRACE) << WRAPPER_DOMAIN_NAME
|
||||||
|
#define WRAPPER_LOG_DEBUG LOG(DEBUG) << WRAPPER_DOMAIN_NAME
|
||||||
|
#define WRAPPER_LOG_INFO LOG(INFO) << WRAPPER_DOMAIN_NAME
|
||||||
|
#define WRAPPER_LOG_WARNING LOG(WARNING) << WRAPPER_DOMAIN_NAME
|
||||||
|
#define WRAPPER_LOG_ERROR LOG(ERROR) << WRAPPER_DOMAIN_NAME
|
||||||
|
#define WRAPPER_LOG_FATAL LOG(FATAL) << WRAPPER_DOMAIN_NAME
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue