Browse Source

add message

tags/v1.2.0
zhangyinxia xuyongfei 5 years ago
parent
commit
bcb30821d5
17 changed files with 537 additions and 9 deletions
  1. +2
    -3
      mindspore_serving/ccsrc/common/grpc_client.cc
  2. +3
    -2
      mindspore_serving/ccsrc/common/grpc_client.h
  3. +1
    -1
      mindspore_serving/ccsrc/master/dispacther.h
  4. +1
    -2
      mindspore_serving/ccsrc/master/notify_worker/base_notify.h
  5. +0
    -1
      mindspore_serving/ccsrc/master/notify_worker/grpc_notify.cc
  6. +36
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/agent_process/agent_process.cc
  7. +41
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/agent_process/agent_process.h
  8. +37
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/distributed_process/distributed_process.cc
  9. +49
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/distributed_process/distributed_process.h
  10. +43
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/notify_agent/base_notify_agent.h
  11. +39
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/notify_agent/notify_agent.cc
  12. +48
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/notify_agent/notify_agent.h
  13. +38
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/notify_distributed/base_notify_worker.h
  14. +91
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/notify_distributed/notify_worker.cc
  15. +53
    -0
      mindspore_serving/ccsrc/worker/distributed_worker/notify_distributed/notify_worker.h
  16. +27
    -0
      mindspore_serving/proto/ms_agent.proto
  17. +28
    -0
      mindspore_serving/proto/ms_distributed.proto

mindspore_serving/ccsrc/master/grpc/grpc_client.cc → mindspore_serving/ccsrc/common/grpc_client.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,10 +14,9 @@
* limitations under the License.
*/
#include "master/grpc/grpc_client.h"
#include "common/grpc_client.h"
#include <string>
#include <utility>
#include "master/grpc/grpc_server.h"
namespace mindspore {
namespace serving {

mindspore_serving/ccsrc/master/grpc/grpc_client.h → mindspore_serving/ccsrc/common/grpc_client.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
#include <functional>
#include <thread>
#include "common/serving_common.h"
#include "master/notify_worker/base_notify.h"
#include "proto/ms_service.pb.h"
#include "proto/ms_service.grpc.pb.h"
#include "proto/ms_master.pb.h"
@@ -38,6 +37,8 @@ extern std::unique_ptr<MSServiceClient> client_;
using PredictOnFinish = std::function<void()>;
using DispatchCallback = std::function<void(Status status)>;
class MSServiceClient {
public:
MSServiceClient() = default;

+ 1
- 1
mindspore_serving/ccsrc/master/dispacther.h View File

@@ -27,7 +27,7 @@
#include "common/instance.h"
#include "common/servable.h"
#include "master/notify_worker/base_notify.h"
#include "master/grpc/grpc_client.h"
#include "common/grpc_client.h"

namespace mindspore::serving {



+ 1
- 2
mindspore_serving/ccsrc/master/notify_worker/base_notify.h View File

@@ -22,12 +22,11 @@
#include "common/serving_common.h"
#include "common/servable.h"
#include "proto/ms_service.pb.h"
#include "common/grpc_client.h"

namespace mindspore {
namespace serving {

using DispatchCallback = std::function<void(Status status)>;

class MS_API BaseNotifyWorker {
public:
BaseNotifyWorker() = default;


+ 0
- 1
mindspore_serving/ccsrc/master/notify_worker/grpc_notify.cc View File

@@ -20,7 +20,6 @@
#include <thread>
#include "common/exit_handle.h"
#include "common/grpc_server.h"
#include "master/grpc/grpc_client.h"

namespace mindspore {
namespace serving {


+ 36
- 0
mindspore_serving/ccsrc/worker/distributed_worker/agent_process/agent_process.cc View File

@@ -0,0 +1,36 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "worker/distributed_worker/agent_process/agent_process.h"
namespace mindspore {
namespace serving {
grpc::Status MSAgentImpl::Exit(grpc::ServerContext *context, const proto::ExitRequest *request,
proto::ExitReply *reply) {
MSI_LOG(INFO) << "Distributed Worker Exit";
// to do : need WorkerAgent support stop funcition
return grpc::Status::OK;
}
grpc::Status MSAgentImpl::Predict(grpc::ServerContext *context, const proto::PredictRequest *request,
proto::PredictReply *reply) {
MSI_LOG(INFO) << "Begin call service Eval";
// to do : need WorkerAgent support run funcition
return grpc::Status::OK;
}
} // namespace serving
} // namespace mindspore

+ 41
- 0
mindspore_serving/ccsrc/worker/distributed_worker/agent_process/agent_process.h View File

@@ -0,0 +1,41 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_SERVING_WORKER_AGENT_PROCESS_H
#define MINDSPORE_SERVING_WORKER_AGENT_PROCESS_H
#include <grpcpp/grpcpp.h>
#include <grpcpp/health_check_service_interface.h>
#include <grpcpp/ext/proto_server_reflection_plugin.h>
#include "common/serving_common.h"
#include "proto/ms_worker.pb.h"
#include "proto/ms_worker.grpc.pb.h"
namespace mindspore {
namespace serving {
// Service Implement
class MSAgentImpl final : public proto::MSWorker::Service {
public:
grpc::Status Predict(grpc::ServerContext *context, const proto::PredictRequest *request,
proto::PredictReply *reply) override;
grpc::Status Exit(grpc::ServerContext *context, const proto::ExitRequest *request, proto::ExitReply *reply) override;
};
} // namespace serving
} // namespace mindspore
#endif // MINDSPORE_SERVING_WORKER_AGENT_PROCESS_H

+ 37
- 0
mindspore_serving/ccsrc/worker/distributed_worker/distributed_process/distributed_process.cc View File

@@ -0,0 +1,37 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "worker/distributed_worker/distributed_process/distributed_process.h"

namespace mindspore {
namespace serving {

grpc::Status MSDistributedImpl::Register(grpc::ServerContext *context, const proto::RegisterRequest *request,
proto::RegisterReply *reply) {
return grpc::Status::OK;
}

grpc::Status MSDistributedImpl::Predict(grpc::ServerContext *context, const proto::PredictRequest *request,
proto::PredictReply *reply) {
return grpc::Status::OK;
}

grpc::Status MSDistributedImpl::Exit(grpc::ServerContext *context, const proto::ExitRequest *request,
proto::ExitReply *reply) {
return grpc::Status::OK;
}
} // namespace serving
} // namespace mindspore

+ 49
- 0
mindspore_serving/ccsrc/worker/distributed_worker/distributed_process/distributed_process.h View File

@@ -0,0 +1,49 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_SERVING_DISTRIBUTED_WORKER_WORKER_PROCESS_H
#define MINDSPORE_SERVING_DISTRIBUTED_WORKER_WORKER_PROCESS_H
#include <grpcpp/grpcpp.h>
#include <grpcpp/health_check_service_interface.h>
#include <grpcpp/ext/proto_server_reflection_plugin.h>
#include "common/serving_common.h"
#include "proto/ms_worker.pb.h"
#include "proto/ms_worker.grpc.pb.h"
#include "proto/ms_service.pb.h"
#include "proto/ms_service.grpc.pb.h"
#include "proto/ms_master.pb.h"
#include "proto/ms_master.grpc.pb.h"
namespace mindspore {
namespace serving {
// Service Implement
class MSDistributedImpl final : public proto::MSMaster::Service, public proto::MSWorker::Service {
public:
MSDistributedImpl() {}
~MSDistributedImpl() = default;
grpc::Status Register(grpc::ServerContext *context, const proto::RegisterRequest *request,
proto::RegisterReply *reply) override;
grpc::Status Predict(grpc::ServerContext *context, const proto::PredictRequest *request,
proto::PredictReply *reply) override;
grpc::Status Exit(grpc::ServerContext *context, const proto::ExitRequest *request, proto::ExitReply *reply) override;
};
} // namespace serving
} // namespace mindspore
#endif // MINDSPORE_SERVING_DISTRIBUTED_WORKER_WORKER_PROCESS_H

+ 43
- 0
mindspore_serving/ccsrc/worker/distributed_worker/notify_agent/base_notify_agent.h View File

@@ -0,0 +1,43 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef MINDSPORE_SERVING_WORKER_BASE_NOTIFY_AGENT_H
#define MINDSPORE_SERVING_WORKER_BASE_NOTIFY_AGENT_H
#include <vector>
#include <functional>
#include <future>
#include "common/serving_common.h"
#include "common/servable.h"
#include "proto/ms_service.pb.h"

namespace mindspore {
namespace serving {

using DistributeCallback = std::function<void(Status status)>;

class MS_API BaseNotifyAgent {
public:
BaseNotifyAgent() = default;
virtual ~BaseNotifyAgent() = default;
virtual Status Exit() = 0;
virtual Status DispatchAsync(const proto::PredictRequest &request, proto::PredictReply *reply,
DistributeCallback callback) = 0;
};

} // namespace serving
} // namespace mindspore

#endif // MINDSPORE_SERVING_WORKER_BASE_NOTIFY_AGENT_H

+ 39
- 0
mindspore_serving/ccsrc/worker/distributed_worker/notify_agent/notify_agent.cc View File

@@ -0,0 +1,39 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "worker/distributed_worker/notify_agent/notify_agent.h"
#include <grpcpp/grpcpp.h>
#include <grpcpp/health_check_service_interface.h>
#include <grpcpp/ext/proto_server_reflection_plugin.h>
#include <thread>
#include "common/exit_handle.h"
#include "common/grpc_server.h"

namespace mindspore {
namespace serving {

GrpcNotfiyAgent::GrpcNotfiyAgent(const std::string &worker_address) {}

GrpcNotfiyAgent::~GrpcNotfiyAgent() = default;

Status GrpcNotfiyAgent::Exit() { return SUCCESS; }

Status GrpcNotfiyAgent::DispatchAsync(const proto::PredictRequest &request, proto::PredictReply *reply,
DistributeCallback callback) {
return SUCCESS;
}

} // namespace serving
} // namespace mindspore

+ 48
- 0
mindspore_serving/ccsrc/worker/distributed_worker/notify_agent/notify_agent.h View File

@@ -0,0 +1,48 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef MINDSPORE_SERVING_WORKER_NOTIFY_AGENT_H
#define MINDSPORE_SERVING_WORKER_NOTIFY_AGENT_H
#include <vector>
#include <string>
#include <memory>
#include <atomic>
#include "worker/distributed_worker/notify_agent/base_notify_agent.h"
#include "proto/ms_agent.pb.h"
#include "proto/ms_agent.grpc.pb.h"

namespace mindspore {
namespace serving {

class MS_API GrpcNotfiyAgent : public BaseNotifyAgent {
public:
explicit GrpcNotfiyAgent(const std::string &worker_address);
~GrpcNotfiyAgent() override;

Status Exit() override;

Status DispatchAsync(const proto::PredictRequest &request, proto::PredictReply *reply,
DistributeCallback callback) override;

private:
std::string worker_address_;
std::shared_ptr<proto::MSAgent::Stub> stub_ = nullptr;
};

} // namespace serving
} // namespace mindspore

#endif // MINDSPORE_SERVING_WORKER_NOTIFY_AGENT_H

+ 38
- 0
mindspore_serving/ccsrc/worker/distributed_worker/notify_distributed/base_notify_worker.h View File

@@ -0,0 +1,38 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef MINDSPORE_SERVING_WORKER_BASE_NOTIFY_WORKER_H
#define MINDSPORE_SERVING_WORKER_BASE_NOTIFY_WORKER_H
#include <vector>
#include "common/serving_common.h"
#include "common/servable.h"
#include "worker/distributed_worker/common.h"

namespace mindspore {
namespace serving {

class MS_API BaseNotifyDistributeWorker {
public:
BaseNotifyDistributeWorker() = default;
virtual ~BaseNotifyDistributeWorker() = default;
virtual Status Register(const std::vector<WorkerAgentSpec> &worker_specs) = 0;
virtual Status Unregister() = 0;
};

} // namespace serving
} // namespace mindspore

#endif // MINDSPORE_SERVING_WORKER_BASE_NOTIFY_WORKER_H

+ 91
- 0
mindspore_serving/ccsrc/worker/distributed_worker/notify_distributed/notify_worker.cc View File

@@ -0,0 +1,91 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "worker/distributed_worker/notify_distributed/notify_worker.h"
#include <grpcpp/grpcpp.h>
#include <grpcpp/health_check_service_interface.h>
#include <grpcpp/ext/proto_server_reflection_plugin.h>
#include <thread>
#include "common/exit_handle.h"
#include "common/grpc_server.h"

namespace mindspore {
namespace serving {

GrpcNotfiyDistributeWorker::GrpcNotfiyDistributeWorker(const std::string &distributed_worker_ip,
uint32_t distributed_worker_port, const std::string &host_ip,
uint32_t host_port)
: distributed_worker_ip_(distributed_worker_ip),
distributed_worker_port_(distributed_worker_port),
host_ip_(host_ip),
host_port_(host_port) {
distributed_worker_address_ = distributed_worker_ip + ":" + std::to_string(distributed_worker_port);
agent_address_ = host_ip_ + ":" + std::to_string(host_port_);
auto channel = GrpcServer::CreateChannel(distributed_worker_address_);
stub_ = proto::MSDistributedWorker::NewStub(channel);
}

GrpcNotfiyDistributeWorker::~GrpcNotfiyDistributeWorker() = default;

Status GrpcNotfiyDistributeWorker::Register(const std::vector<WorkerAgentSpec> &worker_specs) {
const int32_t REGISTER_TIME_OUT = 60;
const int32_t REGISTER_INTERVAL = 1;
auto loop = REGISTER_TIME_OUT;
while (loop-- && !ExitSignalHandle::Instance().HasStopped()) {
MSI_LOG(INFO) << "Register to " << distributed_worker_address_;
proto::RegisterRequest request;
request.set_address(agent_address_);
// to do set RegisterRequest message
proto::RegisterReply reply;
grpc::ClientContext context;
std::chrono::system_clock::time_point deadline =
std::chrono::system_clock::now() + std::chrono::seconds(REGISTER_INTERVAL);
context.set_deadline(deadline);
grpc::Status status = stub_->Register(&context, request, &reply);
if (status.ok()) {
MSI_LOG(INFO) << "Register SUCCESS ";
return SUCCESS;
}
MSI_LOG_INFO << "Grpc message: " << status.error_code() << ", " << status.error_message();
std::this_thread::sleep_for(std::chrono::milliseconds(REGISTER_INTERVAL * 1000));
}
if (ExitSignalHandle::Instance().HasStopped()) {
return INFER_STATUS_LOG_WARNING(FAILED) << "Worker exit, stop registration";
}
return INFER_STATUS_LOG_ERROR(SYSTEM_ERROR) << "Register TimeOut";
}

Status GrpcNotfiyDistributeWorker::Unregister() {
if (is_stoped_.load()) {
return SUCCESS;
}
is_stoped_ = true;
proto::ExitRequest request;
request.set_address(agent_address_);
proto::ExitReply reply;
grpc::ClientContext context;
const int32_t TIME_OUT = 1;
std::chrono::system_clock::time_point deadline = std::chrono::system_clock::now() + std::chrono::seconds(TIME_OUT);
context.set_deadline(deadline);
grpc::Status status = stub_->Exit(&context, request, &reply);
if (status.ok()) {
MSI_LOG(INFO) << "Exit SUCCESS ";
return SUCCESS;
}
return INFER_STATUS_LOG_ERROR(SYSTEM_ERROR) << "Exit Failed";
}

} // namespace serving
} // namespace mindspore

+ 53
- 0
mindspore_serving/ccsrc/worker/distributed_worker/notify_distributed/notify_worker.h View File

@@ -0,0 +1,53 @@
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef MINDSPORE_SERVING_WORKER_NOTIFY_WORKER_H
#define MINDSPORE_SERVING_WORKER_NOTIFY_WORKER_H
#include <vector>
#include <string>
#include <memory>
#include "worker/distributed_worker/notify_distributed/base_notify_worker.h"
#include "proto/ms_master.pb.h"
#include "proto/ms_master.grpc.pb.h"
#include "proto/ms_distributed.pb.h"
#include "proto/ms_distributed.grpc.pb.h"
namespace mindspore {
namespace serving {

class MS_API GrpcNotfiyDistributeWorker : public BaseNotifyDistributeWorker {
public:
GrpcNotfiyDistributeWorker(const std::string &master_ip, uint32_t master_port, const std::string &host_ip,
uint32_t host_port);
~GrpcNotfiyDistributeWorker() override;
Status Register(const std::vector<WorkerAgentSpec> &worker_specs) override;
Status Unregister() override;

private:
std::string distributed_worker_ip_;
uint32_t distributed_worker_port_;
std::string host_ip_;
uint32_t host_port_;
std::string agent_address_;
std::string distributed_worker_address_;

std::unique_ptr<proto::MSDistributedWorker::Stub> stub_;
std::atomic<bool> is_stoped_{false};
};

} // namespace serving
} // namespace mindspore

#endif // MINDSPORE_SERVING_WORKER_NOTIFY_WORKER_H

+ 27
- 0
mindspore_serving/proto/ms_agent.proto View File

@@ -0,0 +1,27 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// ms_manager.proto
syntax = "proto3";

package mindspore.serving.proto;
import "mindspore_serving/proto/ms_service.proto";
import "mindspore_serving/proto/ms_master.proto";

service MSAgent {
rpc Predict(PredictRequest) returns (PredictReply) {}
rpc Exit(ExitRequest) returns (ExitReply) {}
}

+ 28
- 0
mindspore_serving/proto/ms_distributed.proto View File

@@ -0,0 +1,28 @@
/**
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// ms_manager.proto
syntax = "proto3";

package mindspore.serving.proto;
import "mindspore_serving/proto/ms_service.proto";
import "mindspore_serving/proto/ms_master.proto";

service MSDistributedWorker {
rpc Predict(PredictRequest) returns (PredictReply) {}
rpc Exit(ExitRequest) returns (ExitReply) {}
rpc Register(RegisterRequest) returns (RegisterReply) {}
}

Loading…
Cancel
Save