trl
trl copied to clipboard
Key Error in Notebook '04-gpt2-sentiment-ppo-training.ipynb'
Hi Leandro,
I was running the notebook '04-gpt2-sentiment-ppo-training.ipynb' for the first time, and received a Key Error when running the training loop section. It was in this line:
rewards = torch.tensor([output[1]["score"] for output in pipe_outputs]).to(device)
I presume it is safe to omit the '[1]'?
rewards = torch.tensor([output["score"] for output in pipe_outputs]).to(device)
Thanks in advance and best, Philip