src/transformers/models/decision_transformer/modeling_decision_transformer.py/DecisionTransformerGPT2PreTrainedModel/_set_gradient_checkpointing
class DecisionTransformerGPT2PreTrainedModel:    def _set_gradient_checkpointing(self, module, value=False):
        if isinstance(module, DecisionTransformerGPT2Model):
            module.gradient_checkpointing = value