ONNXModelRunner is the main user facing class that interfaces with the Environment and Agent classes to support ML/RL model inference via ONNXModel.
More...
#include <ONNXModelRunner.h>
|
| ONNXModelRunner (MLBridge::Environment *env, std::map< std::string, Agent * > agents, llvm::LLVMContext *Ctx=nullptr) |
|
void | setEnvironment (MLBridge::Environment *_env) |
|
MLBridge::Environment * | getEnvironment () |
|
void | addAgent (Agent *agent, std::string name) |
|
void | requestExit () override |
|
| MLModelRunner (const MLModelRunner &)=delete |
|
MLModelRunner & | operator= (const MLModelRunner &)=delete |
|
virtual | ~MLModelRunner ()=default |
|
template<typename T > |
std::enable_if< std::is_fundamental< T >::value, T >::type | evaluate () |
| Main user-facing method for interacting with the ML models.
|
|
template<typename T > |
std::enable_if< std::is_fundamental< typenamestd::remove_pointer< T >::type >::value, void >::type | evaluate (T &data, size_t &dataSize) |
| Main user-facing method for interacting with the ML models.
|
|
Kind | getKind () const |
|
SerDesKind | getSerDesKind () const |
|
template<typename U , typename T , typename... Types> |
void | populateFeatures (const std::pair< U, T > &var1, const std::pair< U, Types > &...var2) |
| User-facing interface for setting the features to be sent to the model.
|
|
template<typename U , typename T , typename... Types> |
void | populateFeatures (const std::pair< U, T > &&var1, const std::pair< U, Types > &&...var2) |
|
void | populateFeatures () |
|
void | setRequest (void *request) |
| Mainly used in the case of gRPC where the request object is not known explicitly.
|
|
void | setResponse (void *response) |
| Mainly used in the case of gRPC where the response object is not known explicitly.
|
|
ONNXModelRunner is the main user facing class that interfaces with the Environment and Agent classes to support ML/RL model inference via ONNXModel.
Definition at line 42 of file ONNXModelRunner.h.
◆ ONNXModelRunner()
MLBridge::ONNXModelRunner::ONNXModelRunner |
( |
MLBridge::Environment * | env, |
|
|
std::map< std::string, Agent * > | agents, |
|
|
llvm::LLVMContext * | Ctx = nullptr ) |
◆ addAgent()
void ONNXModelRunner::addAgent |
( |
Agent * | agent, |
|
|
std::string | name ) |
◆ computeAction()
void ONNXModelRunner::computeAction |
( |
Observation & | obs | ) |
|
|
private |
◆ evaluateUntyped()
void * ONNXModelRunner::evaluateUntyped |
( |
| ) |
|
|
overrideprivatevirtual |
◆ getEnvironment()
◆ requestExit()
void MLBridge::ONNXModelRunner::requestExit |
( |
| ) |
|
|
inlineoverridevirtual |
◆ setEnvironment()
◆ agents
std::map<std::string, Agent *> MLBridge::ONNXModelRunner::agents |
|
private |
◆ env
The documentation for this class was generated from the following files: