Emo-Aware-Storytelling
Emo-Aware-Storytelling copied to clipboard
question about the RunTimeError when runing bash run_emorl.sh
Thanks for your code and answers for the previous question.I am so sorry to bother you for my new question.I followed the instruction in the ReadME file.when i ran bash run_emorl.sh , and my rl_method is comet, i came across the next question :
Traceback (most recent call last):
File "train_rl.py", line 846, in
I try to solve the question by using try,except,else,but it does not work well.So i guess whether you change the commonsense transformer in some place , if not ,have you ever encountered the above question?If you are busy now,do you own things,if you have free time ,try to answer me .Meantime,I will try to work it out.
Tips:Sometimes this problem appears early, sometimes it appears late。
Maybe i have come up with a bad solution.when the length of prefix is large ,the program will go wrong.As shown below: 90 [295, 323, 496, 569, 12, 4830, 323, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290] and 79 [606, 1040, 485, 481, 6545, 488, 886, 622, 8353, 1011, 295, 323, 496, 569, 12, 4830, 323, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290] so i change the code: if len(prefix)>17: xxxxxxxxx; Although this method is successful and the program is training, it is not a perfect solution.And why the number is 290? If you have better solution,try to answer me .At last , i am so sorry to bother you ,hope you have a nice day!
I found a bug when i ran run_emorl.sh (reward :comet) in here :https://github.com/fabrahman/Emo-Aware-Storytelling/blob/a8abea10f498c51cdbea09573e0c4b26aac69e82/Reinforcement/rewards_v2.py#L252 ; In fact ,when the the length of story_rl or story_base is 6 or 7, the code is true,But when the length is 5,for example: [['I was a little girl and was excited to play with my friends.', 'We went to the park and played with our friends.', 'My brother and I were so excited to go play with my friends.', 'We went home and were so happy to be done with the day.', '<|endoftext|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>']] The above error will appear in the code. My solution is to discuss the length of sample_story and then take the value.