MLCompilerBridge
Tools for streamlining communication with ML models for compiler optimizations.
|
Base Environment class to support ONNX based inference of RL models. More...
Go to the source code of this file.
Classes | |
class | MLBridge::Environment |
Namespaces | |
namespace | MLBridge |
Typedefs | |
typedef signed | Action |
Base Environment class to support ONNX based inference of RL models.
This class is used to define the environment for the agents to interact with.
The Environment should be defined by the compiler pass that is using the MLCompilerBridge. The environment should be defined by inheriting from this class and implementing the step() and reset() methods.
step() and reset() are typical methods used in RL environments.
The step() method takes an action as input and returns the observation corresponding to the next state. The reset() method returns the initial observation.
Usage:
Example:
This environment can then be used by the ONNXModelRunner to interact with the agents. getNextAgent() and setNextAgent() methods can be used to set the next agent to interact with. These methods are used in step() and reset() to get the next agent to interact with in case of multi-agent environment.
Definition in file environment.h.
typedef signed Action |
Definition at line 53 of file environment.h.