RLModule API
Contents
RLModule API#
RL Module specifications and configuraitons#
Single Agent#
|
A utility spec class to make it constructing RLModules (in single-agent case) easier. |
Builds the RLModule from this spec. |
|
Returns the RLModule config for this spec. |
RLModule Configuration#
|
A utility config class to make it constructing RLModules easier. |
Returns a serialized representation of the config. |
|
Creates a config from a serialized representation. |
|
Returns the catalog for this config. |
Multi Agent#
|
A utility spec class to make it constructing MARL modules easier. |
|
Builds either the multi-agent module or the single-agent module. |
Returns the MultiAgentRLModuleConfig for this spec. |
RL Module API#
Constructor#
|
Base class for RLlib modules. |
Returns a multi-agent wrapper around this module. |
Forward methods#
|
Forward-pass during training called from the learner. |
|
Forward-pass during exploration, called from the sampler. |
|
Forward-pass during evaluation, called from the sampler. |
IO specifications#
Returns the input specs of the forward_inference method. |
|
Returns the input specs of the forward_exploration method. |
|
Returns the input specs of the forward_train method. |
|
Returns the output specs of the forward_inference method. |
|
Returns the output specs of the forward_exploration method. |
|
Returns the output specs of the forward_train method. |
Saving and Loading#
Returns the state dict of the module. |
|
|
Sets the state dict of the module. |
|
Saves the weights of this RLModule to path. |
|
Loads the weights of an RLModule from path. |
|
Saves the module to a checkpoint directory. |
|
Loads the module from a checkpoint directory. |
Multi Agent RL Module API#
Constructor#
|
Base class for multi-agent RLModules. |
Sets up the underlying RLModules. |
|
Returns a multi-agent wrapper around this module. |
Modifying the underlying RL modules#
|
Adds a module at run time to the multi-agent module. |
|
Removes a module at run time from the multi-agent module. |
Saving and Loading#
|
Saves the weights of this MultiAgentRLModule to dir. |
|
Loads the weights of an MultiAgentRLModule from dir. |