Skip to content

Commit 5291015

Browse files
Remove Optional from processing_class in PPOTrainer (#4212)
1 parent 0588b1f commit 5291015

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

trl/trainer/ppo_trainer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ class PPOTrainer(BaseTrainer):
146146
def __init__(
147147
self,
148148
args: PPOConfig,
149-
processing_class: Optional[
150-
Union[PreTrainedTokenizerBase, BaseImageProcessor, FeatureExtractionMixin, ProcessorMixin]
151-
],
149+
processing_class: Union[PreTrainedTokenizerBase, BaseImageProcessor, FeatureExtractionMixin, ProcessorMixin],
152150
model: nn.Module,
153151
ref_model: Optional[nn.Module],
154152
reward_model: nn.Module,

0 commit comments

Comments
 (0)