ray.rllib.utils.checkpoints.Checkpointable#
- class ray.rllib.utils.checkpoints.Checkpointable[source]#
- Bases: - ABC- Abstract base class for a component of RLlib that can be checkpointed to disk. - Subclasses must implement the following APIs: - save_to_path() - restore_from_path() - from_checkpoint() - get_state() - set_state() - get_ctor_args_and_kwargs() - get_metadata() - get_checkpointable_components() - PublicAPI (alpha): This API is in alpha and may change before becoming stable. - Methods - Creates a new Checkpointable instance from the given location and returns it. - Returns the implementing class's own Checkpointable subcomponents. - Returns the args/kwargs used to create - selffrom its constructor.- Returns JSON writable metadata further describing the implementing class. - Returns the implementing class's current state as a dict. - Restores the state of the implementing class from the given path. - Saves the state of the implementing class (or - state) to- path.- Sets the implementing class' state to the given state dict. - Attributes