AlgorithmConfig.serialize() Dict[str, Any][source]#

Returns a mapping from str to JSON’able values representing this config.

The resulting values will not have any code in them. Classes (such as callbacks_class) will be converted to their full classpath, e.g. ray.rllib.algorithms.callbacks.DefaultCallbacks. Actual code such as lambda functions will be written as their source code (str) plus any closure information for properly restoring the code inside the AlgorithmConfig object made from the returned dict data. Dataclass objects get converted to dicts.


A dict mapping from str to JSON’able values.