huggingface / trl

Train transformer language models with reinforcement learning.
http://hf.co/docs/trl
Apache License 2.0
10.13k stars 1.28k forks source link

[winrate callback] remove redundant call to eval and train #2372

Closed kashif closed 2 days ago

kashif commented 2 days ago

What does this PR do?

removes the redundant call to eval and train as the model's generate is done in inference mode. This fixes the issue that the mode's state is not changed unexpectedly.

HuggingFaceDocBuilderDev commented 2 days ago

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

kashif commented 2 days ago

thanks @qgallouedec

qgallouedec commented 2 days ago

Failing test not related (same as https://github.com/huggingface/trl/pull/2370#issuecomment-2486585773)