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.
-
void SetConfigInfo(const std::string §ion, const std::map<std::string, std::string> &config)
Set the config before runtime. Only valid for ModelParallelRunner.
- Parameters
config – [in] store environment variables before runtime.
-
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.
-
void SetWorkersNum(int32_t workers_num)