THUDM / LongBench

[ACL 2024] LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding
MIT License
675 stars 54 forks source link

AttributeError: 'str' object has no attribute 'to' #53

Closed vincent507cpu closed 9 months ago

vincent507cpu commented 9 months ago
Traceback (most recent call last):
  File "/home/./miniconda3/envs/longbench/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/home/./miniconda3/envs/longbench/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/./GitHub/LongBench-main/pred.py", line 66, in get_pred
    input = prompt.to(device)
            ^^^^^^^^^
AttributeError: 'str' object has no attribute 'to
bys0318 commented 9 months ago

Thanks for pointing it out! We have corrected the code.