ray.rllib.core.learner.learner.Learner._is_module_compatible_with_learner#

abstract Learner._is_module_compatible_with_learner(module: RLModule) bool[source]#

Check whether the module is compatible with the learner.

For example, if there is a random RLModule, it will not be a torch or tf module, but rather it is a numpy module. Therefore we should not consider it during gradient based optimization.

Parameters:

module – The module to check.

Returns:

True if the module is compatible with the learner.