VART-ML  0.3.0
vart::RunnerFactory Class Reference

Factory class for creating Runner instances. More...

#include <vart_runner_factory.hpp>

Static Public Member Functions

static std::shared_ptr< Runnercreate_runner (RunnerType runner_type, const std::string &model_path, const std::unordered_map< std::string, std::any > &options={})
 Creates and returns a shared pointer to a Runner instance. More...
 

Detailed Description

Factory class for creating Runner instances.

Provides a static method to instantiate Runner objects based on the specified runner type, model path, and optional configuration options.

See also
Runner

Member Function Documentation

◆ create_runner()

static std::shared_ptr<Runner> vart::RunnerFactory::create_runner ( RunnerType  runner_type,
const std::string &  model_path,
const std::unordered_map< std::string, std::any > &  options = {} 
)
static

Creates and returns a shared pointer to a Runner instance.

This static method initializes a Runner object for the specified runner type, using the provided model path and optional configuration options.

Parameters
runner_typeThe type of runner to create (e.g., VAIML).
model_pathThe file system path to the model to be loaded by the Runner.
optionsAn optional map of RunnerType specific configuration options, where each option is identified by a string key and can hold a value of any type. Supported keys and their default values are RunnerType-specific. For RunnerType::VAIML, see RunnerType::VAIML Configuration.
Returns
std::shared_ptr<Runner> A shared pointer to the created Runner instance.
Exceptions
std::runtime_errorif the runner type is unsupported or creation fails.

The documentation for this class was generated from the following file: