ray.rllib.core.learner.learner.TorchCompileWhatToCompile#

class ray.rllib.core.learner.learner.TorchCompileWhatToCompile(value)[source]#

Bases: str, enum.Enum

Enumerates schemes of what parts of the TorchLearner can be compiled.

This can be either the entire update step of the learner or only the forward methods (and therein the forward_train method) of the RLModule.

Note

  • torch.compiled code can become slow on graph breaks or even raise

    errors on unsupported operations. Empirically, compiling forward_train should introduce little graph breaks, raise no errors but result in a speedup comparable to compiling the complete update.

  • Using complete_update is experimental and may result in errors.

Attributes

COMPLETE_UPDATE

FORWARD_TRAIN