diff --git a/mindspore/ccsrc/ps/core/abstract_node.cc b/mindspore/ccsrc/ps/core/abstract_node.cc index 9b14ce48db..4de1604b01 100644 --- a/mindspore/ccsrc/ps/core/abstract_node.cc +++ b/mindspore/ccsrc/ps/core/abstract_node.cc @@ -392,8 +392,8 @@ bool AbstractNode::Disconnect(const std::shared_ptr &client, const ui if (!SendMessageSync(client, meta, Protos::PROTOBUF, finish_message.SerializeAsString().data(), finish_message.ByteSizeLong())) { - MS_LOG(ERROR) << "The node role:" << CommUtil::NodeRoleToString(node_info_.node_role_) - << " the node id:" << node_info_.node_id_ << " send Finish Message timeout!"; + MS_LOG(WARNING) << "The node role:" << CommUtil::NodeRoleToString(node_info_.node_role_) + << " the node id:" << node_info_.node_id_ << " send Finish Message timeout!"; } return WaitForDisconnect(timeout); } diff --git a/mindspore/ccsrc/ps/core/node_manager.cc b/mindspore/ccsrc/ps/core/node_manager.cc index 197f8a984f..ed570b0ca2 100644 --- a/mindspore/ccsrc/ps/core/node_manager.cc +++ b/mindspore/ccsrc/ps/core/node_manager.cc @@ -95,7 +95,7 @@ void NodeManager::UpdateClusterState() { timeout_nodes_info_.clear(); for (auto it = heartbeats_.begin(); it != heartbeats_.end(); ++it) { if (it->second.tv_sec + ClusterMetadata::instance()->heartbeat_timeout() < current_time.tv_sec) { - MS_LOG(ERROR) << "The node id:" << it->first << " is timeout!"; + MS_LOG(WARNING) << "The node id:" << it->first << " is timeout!"; timeout_nodes_info_[it->first] = nodes_info_[it->first]; } } diff --git a/mindspore/ccsrc/ps/parameter_server.cc b/mindspore/ccsrc/ps/parameter_server.cc index 0cd510b53a..e50d727220 100644 --- a/mindspore/ccsrc/ps/parameter_server.cc +++ b/mindspore/ccsrc/ps/parameter_server.cc @@ -493,15 +493,26 @@ void ParameterServer::ServerHandler::Init() { handlers_[kFinalizeCmd] = &ServerHandler::HandleFinalize; handlers_[kPushCmd] = &ServerHandler::HandlePushReq; handlers_[kPullCmd] = &ServerHandler::HandlePullReq; + commands_[kInitWeightsCmd] = "kInitWeightsCmd"; + commands_[kInitWeightToOptimIdCmd] = "kInitWeightToOptimIdCmd"; + commands_[kInitOptimInputsShapeCmd] = "kInitOptimInputsShapeCmd"; + commands_[kInitEmbeddingsCmd] = "kInitEmbeddingsCmd"; + commands_[kCheckReadyForPushCmd] = "kCheckReadyForPushCmd"; + commands_[kCheckReadyForPullCmd] = "kCheckReadyForPullCmd"; + commands_[kEmbeddingLookupCmd] = "kEmbeddingLookupCmd"; + commands_[kUpdateEmbeddingsCmd] = "kUpdateEmbeddingsCmd"; + commands_[kFinalizeCmd] = "kFinalizeCmd"; + commands_[kPushCmd] = "kPushCmd"; + commands_[kPullCmd] = "kPullCmd"; } void ParameterServer::ServerHandler::operator()(std::shared_ptr conn, std::shared_ptr meta, DataPtr data, size_t size) { auto output = std::make_shared>(); - MS_LOG(INFO) << "The command is:" << meta->user_cmd(); - if (handlers_.count(meta->user_cmd()) == 0) { + if (commands_.count(meta->user_cmd()) == 0) { MS_LOG(EXCEPTION) << "The command:" << meta->user_cmd() << " is not supported!"; } + MS_LOG(INFO) << "The command is:" << commands_[meta->user_cmd()]; auto &handler_ptr = handlers_[meta->user_cmd()]; (this->*handler_ptr)(data, size, output); diff --git a/mindspore/ccsrc/ps/parameter_server.h b/mindspore/ccsrc/ps/parameter_server.h index 4f312c4b3c..d1b44071eb 100644 --- a/mindspore/ccsrc/ps/parameter_server.h +++ b/mindspore/ccsrc/ps/parameter_server.h @@ -112,6 +112,7 @@ class ParameterServer { ParameterServer *ps_; typedef void (ServerHandler::*RequestHandler)(DataPtr data, size_t size, VectorPtr res); std::unordered_map handlers_; + std::unordered_map commands_; std::unordered_map init_weights_; std::unordered_map init_weight_to_optim_; std::unordered_map init_optim_info_;