Simulator class simulates the environments and runs the agent through the environment. More...
Public Member Functions | |
| def | __init__ (self, Dict[str, Any] config, bool is_child_process=False) |
| None | run (self, **kwargs) |
| This method runs the simulator. More... | |
| Agent | setup_agent (self) |
| This method sets up agent by loading all the necessary arguments. More... | |
| List[pytorch.nn.Module] | setup_models (self) |
| The method sets up the models. More... | |
Data Fields | |
| agent | |
| The agent object requested via config. More... | |
| agent_model_args | |
| config | |
| The input config. More... | |
| env | |
| The environment object requested via config or passed via config. More... | |
| is_custom_model | |
| The flag indicating if the model is custom or not, i.e. More... | |
| sanity_check | |
| The object of rlpack.utils.sanity_check.SanityCheck to perform sanity checks on arguments. More... | |
| setup | |
| The object of rlpack.utils.setup.Setup to set-up models. More... | |
Simulator class simulates the environments and runs the agent through the environment.
It also sets up the models and agents for training and/or evaluation.
| def rlpack.simulator.Simulator.__init__ | ( | self, | |
| Dict[str, Any] | config, | ||
| bool | is_child_process = False |
||
| ) |
| config | Dict[str, Any]: The configuration dictionary for setup. |
| is_child_process | bool: Indicates if Simulator is being run as a child process. Default: False |
| None rlpack.simulator.Simulator.run | ( | self, | |
| ** | kwargs | ||
| ) |
This method runs the simulator.
| kwargs | Additional keyword arguments for the training run. |
| Agent rlpack.simulator.Simulator.setup_agent | ( | self | ) |
This method sets up agent by loading all the necessary arguments.
| List[pytorch.nn.Module] rlpack.simulator.Simulator.setup_models | ( | self | ) |
The method sets up the models.
Depending on the requirement of the agent, returns a list of models, all of which are loaded and initialized.
| rlpack.simulator.Simulator.agent |
The agent object requested via config.
| rlpack.simulator.Simulator.agent_model_args |
| rlpack.simulator.Simulator.config |
The input config.
| rlpack.simulator.Simulator.env |
The environment object requested via config or passed via config.
| rlpack.simulator.Simulator.is_custom_model |
The flag indicating if the model is custom or not, i.e.
does not use in-built models.
| rlpack.simulator.Simulator.sanity_check |
The object of rlpack.utils.sanity_check.SanityCheck to perform sanity checks on arguments.
| rlpack.simulator.Simulator.setup |
The object of rlpack.utils.setup.Setup to set-up models.