MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
Loading...
Searching...
No Matches
Classes | Namespaces
ONNXModelRunner.h File Reference

ONNXModelRunner class supporting communication via ONNX C++ Runtime. More...

#include "MLModelRunner/MLModelRunner.h"
#include "MLModelRunner/ONNXModelRunner/agent.h"
#include "MLModelRunner/ONNXModelRunner/environment.h"
Include dependency graph for ONNXModelRunner.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MLBridge::ONNXModelRunner
 ONNXModelRunner is the main user facing class that interfaces with the Environment and Agent classes to support ML/RL model inference via ONNXModel. More...
 

Namespaces

namespace  MLBridge
 

Detailed Description

ONNXModelRunner class supporting communication via ONNX C++ Runtime.

Only inference is supported.

This class interfaces with Environment and Agent classes to support ML/RL model inference via ONNXModel.

Usage:

  1. Construct an ONNXModelRunner object with the environment and the agents. Environment and agents are created by the user by inheriting from the Environment class and using the Agent class.
  2. Multiple agents can be added to the ONNXModelRunner object using the addAgent() method. The agents are identified by a unique name.
  3. Call evaluate() to get the result from the model.

Internally the ONNXModelRunner object will call the step() method of the environment to get the next observation and the computeAction() method of the agent to get the action corresponding to the observation.

Definition in file ONNXModelRunner.h.