ray.rllib.core.learner.learner.TorchCompileWhatToCompile
ray.rllib.core.learner.learner.TorchCompileWhatToCompile#
- class ray.rllib.core.learner.learner.TorchCompileWhatToCompile(value)[source]#
Bases:
str,enum.EnumEnumerates 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_trainshould introduce little graph breaks, raise no errors but result in a speedup comparable to compiling the complete update.
Using
complete_updateis experimental and may result in errors.
Attributes