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.

Parameters

workers_num[in] the number of workers at runtime.

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

Set the context at runtime. Only valid for ModelParallelRunner.

Parameters

context[in] store environment variables at runtime.

void SetConfigInfo(const std::string &section, 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.