Class RunnerConfig

Class Documentation

class RunnerConfig

The RunnerConfig class is used to store environment variables during execution management.

Public Functions

void SetWorkersNum(int32_t workers_num)

Set the number of workers at runtime. Only valid for ModelParallelRunner.

参数

workers_num[in] the number of workers at runtime.

int32_t GetWorkersNum() const

Get the current operators parallel workers number setting. Only valid for ModelParallelRunner.

返回

The current operators parallel workers number setting.

void SetContext(const std::shared_ptr<Context> &context)

Set the context at runtime. Only valid for ModelParallelRunner.

参数

context[in] store environment variables at runtime.

std::shared_ptr<Context> GetContext() const

Get the current context setting. Only valid for ModelParallelRunner.

返回

The current operators context setting.

inline void SetConfigInfo(const std::string &section, const std::map<std::string, std::string> &config)

Set the config before runtime. Only valid for ModelParallelRunner.

参数
  • section[in] The category of the configuration parameter.

  • config[in] store environment variables before runtime.

inline std::map<std::string, std::map<std::string, std::string>> GetConfigInfo() const

Get the current config setting. Only valid for ModelParallelRunner.

返回

The current config setting.

inline void SetConfigPath(const std::string &config_path)

Set the config path before runtime. Only valid for ModelParallelRunner.

参数

config_path[in] The path of the configuration parameter.

inline std::string GetConfigPath() const

Get the current config path. Only valid for ModelParallelRunner.

返回

The current config path.