diff --git a/core/predictor/framework/resource.cpp b/core/predictor/framework/resource.cpp index 07010ac82cfa9f1b1319beb3480a2faaca856ecb..d3175f819c0567f688e1d40cd1d584baa03bcaca 100644 --- a/core/predictor/framework/resource.cpp +++ b/core/predictor/framework/resource.cpp @@ -144,14 +144,17 @@ int Resource::initialize(const std::string& path, const std::string& file) { return -1; } // init rocksDB or cube instance - if (resource_conf.has_cube_config_file() && resource_conf.has_cube_config_path()) { + if (resource_conf.has_cube_config_file() && + resource_conf.has_cube_config_path()) { LOG(INFO) << "init cube client, path[ " << resource_conf.cube_config_path() - << " ], config file [ " << resource_conf.cube_config_file() << " ]."; - rec::mcube::CubeAPI *cube = rec::mcube::CubeAPI::instance(); - std::string cube_config_fullpath = "./" + resource_conf.cube_config_path() +"/" + resource_conf.cube_config_file(); + << " ], config file [ " << resource_conf.cube_config_file() + << " ]."; + rec::mcube::CubeAPI* cube = rec::mcube::CubeAPI::instance(); + std::string cube_config_fullpath = "./" + resource_conf.cube_config_path() + + "/" + resource_conf.cube_config_file(); this->cube_config_fullpath = cube_config_fullpath; } - + if (db.get() == nullptr) { db = RocksDBWrapper::RocksDBWrapperFactory("kvdb"); } @@ -166,7 +169,7 @@ int Resource::general_model_initialize(const std::string& path, // TODO: add serving dist op detection, if true, add cube instance init. if (this->cube_config_fullpath.size() != 0) { LOG(INFO) << "init cube by config file : " << this->cube_config_fullpath; - rec::mcube::CubeAPI *cube = rec::mcube::CubeAPI::instance(); + rec::mcube::CubeAPI* cube = rec::mcube::CubeAPI::instance(); cube->init(this->cube_config_fullpath.c_str()); } VLOG(2) << "general model path: " << path; @@ -211,13 +214,10 @@ int Resource::general_model_initialize(const std::string& path, for (int i = 0; i < feed_var_num; ++i) { _config->_feed_name[i] = model_config.feed_var(i).name(); _config->_feed_alias_name[i] = model_config.feed_var(i).alias_name(); - VLOG(2) << "feed var[" << i << "]: " - << _config->_feed_name[i]; - VLOG(2) << "feed var[" << i << "]: " - << _config->_feed_alias_name[i]; + VLOG(2) << "feed var[" << i << "]: " << _config->_feed_name[i]; + VLOG(2) << "feed var[" << i << "]: " << _config->_feed_alias_name[i]; _config->_feed_type[i] = model_config.feed_var(i).feed_type(); - VLOG(2) << "feed type[" << i << "]: " - << _config->_feed_type[i]; + VLOG(2) << "feed type[" << i << "]: " << _config->_feed_type[i]; if (model_config.feed_var(i).is_lod_tensor()) { VLOG(2) << "var[" << i << "] is lod tensor";