Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'ListWrapper' object is not iterable #27

Open
Shinning-Zhou opened this issue Dec 18, 2024 · 1 comment
Open

TypeError: 'ListWrapper' object is not iterable #27

Shinning-Zhou opened this issue Dec 18, 2024 · 1 comment

Comments

@Shinning-Zhou
Copy link

I met:

  File "/mnt/sharedata/hdd/zhouxn/ICLCP/group_distance_k.py", line 33, in group_with_distance
    retriever = TopkRetriever(data, ice_num=3, batch_size=args.batch_size, index_split='train', test_split='test')
  File "/mnt/sharedata/hdd/zhouxn/ICLCP/openicl/icl_retriever/icl_topk_retriever.py", line 78, in __init__
    self.index = self.create_index()
  File "/mnt/sharedata/hdd/zhouxn/ICLCP/openicl/icl_retriever/icl_topk_retriever.py", line 86, in create_index
    res_list = self.forward(dataloader, process_bar=True, information="Creating index for index set...")
  File "/mnt/sharedata/hdd/zhouxn/ICLCP/openicl/icl_retriever/icl_topk_retriever.py", line 114, in forward
    res_list.extend([{"embed": r, "metadata": m} for r, m in zip(res, metadata)])
TypeError: 'ListWrapper' object is not iterable

I wonder what will cause this error?

@maxuetao
Copy link

maxuetao commented Jan 6, 2025

I have the same problem, could you please share your solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants