SAI990323 / TALLRec

Apache License 2.0
190 stars 31 forks source link

运行evaluate.py,出现list index out of range #39

Closed fine1123 closed 9 months ago

fine1123 commented 10 months ago
SAI990323 commented 10 months ago

Could you provide your environment and script? It seems that you have used the latest package which doesn't fit for this repo. We use bitsandbytes==0.37.2, peft==0.3.0, transformers==4.28.0 I have updated the requirements.

fine1123 commented 10 months ago
SAI990323 commented 10 months ago

It appears that there are some mismatches between the Windows and Linux environments, which necessitate code modifications. Unfortunately, I do not possess a Windows environment with a GPU. Additionally, may I inquire if you would be able to run the inference using the "evaluate.py" script we have provided? I have noticed that you have made some modifications to the code.

fine1123 commented 9 months ago
SAI990323 commented 9 months ago

Qeustion1: 32it后报错是因为 一共1000个样本,batch是32,32 * 32 = 1024 > 1000 正好推理完成,类似的30和60也一样 Question2: 与batch size大小本身没有关系,报错的原因应当是您修改了evaluate.py的代码导致返回的推理结果条目数和输入的条目数对不上,您可以检查一下evaluate函数的返回结果或者使用原始代码

fine1123 commented 9 months ago

感谢您耐心的解答!使用您提供的代码,不会出现错误。