MLModelRunner - The main interface for interacting with the ML models.
More...
#include <MLModelRunner.h>
|
| 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 |
|
virtual void | requestExit ()=0 |
|
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.
|
|
MLModelRunner - The main interface for interacting with the ML models.
Definition at line 56 of file MLModelRunner.h.
◆ Kind
◆ MLModelRunner() [1/3]
◆ ~MLModelRunner()
virtual MLBridge::MLModelRunner::~MLModelRunner |
( |
| ) |
|
|
virtualdefault |
◆ MLModelRunner() [2/3]
MLBridge::MLModelRunner::MLModelRunner |
( |
Kind | Type, |
|
|
SerDesKind | SerDesType, |
|
|
llvm::LLVMContext * | Ctx = nullptr ) |
|
inlineprotected |
◆ MLModelRunner() [3/3]
MLBridge::MLModelRunner::MLModelRunner |
( |
Kind | Type, |
|
|
llvm::LLVMContext * | Ctx = nullptr ) |
|
inlineprotected |
◆ evaluate() [1/2]
template<typename T >
std::enable_if< std::is_fundamental< T >::value, T >::type MLBridge::MLModelRunner::evaluate |
( |
| ) |
|
|
inline |
Main user-facing method for interacting with the ML models.
Definition at line 65 of file MLModelRunner.h.
◆ evaluate() [2/2]
template<typename T >
std::enable_if< std::is_fundamental< typenamestd::remove_pointer< T >::type >::value, void >::type MLBridge::MLModelRunner::evaluate |
( |
T & | data, |
|
|
size_t & | dataSize ) |
|
inline |
Main user-facing method for interacting with the ML models.
Definition at line 74 of file MLModelRunner.h.
◆ evaluateUntyped()
virtual void * MLBridge::MLModelRunner::evaluateUntyped |
( |
| ) |
|
|
protectedpure virtual |
◆ getKind()
Kind MLBridge::MLModelRunner::getKind |
( |
| ) |
const |
|
inline |
◆ getSerDesKind()
SerDesKind MLBridge::MLModelRunner::getSerDesKind |
( |
| ) |
const |
|
inline |
◆ initSerDes()
void MLBridge::MLModelRunner::initSerDes |
( |
| ) |
|
|
inlineprivate |
◆ operator=()
◆ populateFeatures() [1/3]
void MLBridge::MLModelRunner::populateFeatures |
( |
| ) |
|
|
inline |
◆ populateFeatures() [2/3]
template<typename U , typename T , typename... Types>
void MLBridge::MLModelRunner::populateFeatures |
( |
const std::pair< U, T > && | var1, |
|
|
const std::pair< U, Types > &&... | var2 ) |
|
inline |
◆ populateFeatures() [3/3]
template<typename U , typename T , typename... Types>
void MLBridge::MLModelRunner::populateFeatures |
( |
const std::pair< U, T > & | var1, |
|
|
const std::pair< U, Types > &... | var2 ) |
|
inline |
User-facing interface for setting the features to be sent to the model.
The features are passed as a list of key-value pairs. The key is the name of the feature and the value is the value of the feature. The value can be a scalar or a vector.
Definition at line 97 of file MLModelRunner.h.
◆ requestExit()
virtual void MLBridge::MLModelRunner::requestExit |
( |
| ) |
|
|
pure virtual |
◆ setRequest()
void MLBridge::MLModelRunner::setRequest |
( |
void * | request | ) |
|
|
inline |
Mainly used in the case of gRPC where the request object is not known explicitly.
Definition at line 114 of file MLModelRunner.h.
◆ setResponse()
void MLBridge::MLModelRunner::setResponse |
( |
void * | response | ) |
|
|
inline |
Mainly used in the case of gRPC where the response object is not known explicitly.
Definition at line 118 of file MLModelRunner.h.
◆ Ctx
llvm::LLVMContext* MLBridge::MLModelRunner::Ctx |
|
protected |
◆ SerDes
std::unique_ptr<BaseSerDes> MLBridge::MLModelRunner::SerDes |
|
protected |
◆ SerDesType
const SerDesKind MLBridge::MLModelRunner::SerDesType |
|
protected |
◆ Type
const Kind MLBridge::MLModelRunner::Type |
|
protected |
The documentation for this class was generated from the following file: