Class RunnerConfig
Defined in File model_parallel_runner.h
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.
- Parameters
workers_num – [in] the number of workers at runtime.
Set the context at runtime. Only valid for ModelParallelRunner.
- Parameters
context – [in] store environment variables at runtime.
-
inline void SetConfigInfo(const std::string §ion, const std::map<std::string, std::string> &config)
Set the config before runtime. Only valid for ModelParallelRunner.
- Parameters
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.
- Returns
The current config setting.
-
int32_t GetWorkersNum() const
Get the current operators parallel workers number setting. Only valid for ModelParallelRunner.
- Returns
The current operators parallel workers number setting.
-
std::shared_ptr<Context> GetContext() const
Get the current context setting. Only valid for ModelParallelRunner.
- Returns
The current operators context setting.
-
inline void SetConfigPath(const std::string &config_path)
Set the config path before runtime. Only valid for ModelParallelRunner.
- Parameters
config_path – [in] The path of the configuration parameter.
-
inline std::string GetConfigPath() const
Get the current config path. Only valid for ModelParallelRunner.
- Returns
The current config path.
-
void SetWorkersNum(int32_t workers_num)