Browse Source

Alarm modification

tags/v1.0.0
shenwei41 5 years ago
parent
commit
015613d91f
6 changed files with 12 additions and 0 deletions
  1. +2
    -0
      mindspore/ccsrc/minddata/dataset/callback/callback_manager.h
  2. +2
    -0
      mindspore/ccsrc/minddata/dataset/callback/callback_param.h
  3. +2
    -0
      mindspore/ccsrc/minddata/dataset/callback/py_ds_callback.h
  4. +2
    -0
      mindspore/ccsrc/minddata/dataset/engine/cache/cache_client.h
  5. +2
    -0
      mindspore/ccsrc/minddata/dataset/engine/cache/cache_server.h
  6. +2
    -0
      mindspore/ccsrc/minddata/dataset/engine/gnn/graph_data_server.h

+ 2
- 0
mindspore/ccsrc/minddata/dataset/callback/callback_manager.h View File

@@ -35,6 +35,8 @@ class CallbackManager {
/// \brief CallbackManager default constructor. Init needs to be called before using the created instance. /// \brief CallbackManager default constructor. Init needs to be called before using the created instance.
CallbackManager() : enabled_(false) {} CallbackManager() : enabled_(false) {}


~CallbackManager() = default;

/// \brief /// \brief
/// \param [in] callbacks list of callbacks to perform /// \param [in] callbacks list of callbacks to perform
void AddCallbacks(std::vector<std::shared_ptr<DSCallback>> callbacks); void AddCallbacks(std::vector<std::shared_ptr<DSCallback>> callbacks);


+ 2
- 0
mindspore/ccsrc/minddata/dataset/callback/callback_param.h View File

@@ -29,6 +29,8 @@ class CallbackParam {
CallbackParam(int64_t epoch_num, int64_t cur_epoch_step, int64_t total_step_num) CallbackParam(int64_t epoch_num, int64_t cur_epoch_step, int64_t total_step_num)
: cur_epoch_num_(epoch_num), cur_epoch_step_num_(cur_epoch_step), cur_step_num_(total_step_num) {} : cur_epoch_num_(epoch_num), cur_epoch_step_num_(cur_epoch_step), cur_step_num_(total_step_num) {}


~CallbackParam() = default;

// these are constant public fields for easy access and consistency with python cb_param // these are constant public fields for easy access and consistency with python cb_param
// the names and orders are consistent with batchInfo // the names and orders are consistent with batchInfo
const int64_t cur_epoch_num_; // current epoch const int64_t cur_epoch_num_; // current epoch


+ 2
- 0
mindspore/ccsrc/minddata/dataset/callback/py_ds_callback.h View File

@@ -42,6 +42,8 @@ class PyDSCallback : public DSCallback {
epoch_end_needed_(false), epoch_end_needed_(false),
step_end_needed_(false) {} step_end_needed_(false) {}


~PyDSCallback() = default;

void setBegin(py::function f); void setBegin(py::function f);
void setEnd(py::function f); void setEnd(py::function f);
void setEpochBegin(py::function f); void setEpochBegin(py::function f);


+ 2
- 0
mindspore/ccsrc/minddata/dataset/engine/cache/cache_client.h View File

@@ -52,6 +52,8 @@ class CacheClient {
prefetch_size_ = 20; // rows_per_buf is too small (1 by default). prefetch_size_ = 20; // rows_per_buf is too small (1 by default).
} }


~Builder() = default;

/// Setter function to set the session id /// Setter function to set the session id
/// \param session_id /// \param session_id
/// \return Builder object itself. /// \return Builder object itself.


+ 2
- 0
mindspore/ccsrc/minddata/dataset/engine/cache/cache_server.h View File

@@ -49,6 +49,8 @@ class CacheServer : public Service {
public: public:
Builder() : top_("/tmp"), num_workers_(32), port_(50052), shared_memory_sz_in_gb_(4) {} Builder() : top_("/tmp"), num_workers_(32), port_(50052), shared_memory_sz_in_gb_(4) {}


~Builder() = default;

/// \brief Getter functions /// \brief Getter functions
const std::string &getTop() const { return top_; } const std::string &getTop() const { return top_; }
int32_t getNumWorkers() const { return num_workers_; } int32_t getNumWorkers() const { return num_workers_; }


+ 2
- 0
mindspore/ccsrc/minddata/dataset/engine/gnn/graph_data_server.h View File

@@ -164,6 +164,8 @@ class GraphDataGrpcServer : public GrpcAsyncServer {
GraphDataGrpcServer(const std::string &host, int32_t port, GraphDataServiceImpl *service_impl) GraphDataGrpcServer(const std::string &host, int32_t port, GraphDataServiceImpl *service_impl)
: GrpcAsyncServer(host, port), service_impl_(service_impl) {} : GrpcAsyncServer(host, port), service_impl_(service_impl) {}


~GraphDataGrpcServer() = default;

Status RegisterService(grpc::ServerBuilder *builder) { Status RegisterService(grpc::ServerBuilder *builder) {
builder->RegisterService(&svc_); builder->RegisterService(&svc_);
return Status::OK(); return Status::OK();


Loading…
Cancel
Save