Skip to content

TypeError: 'ListWrapper' object is not iterable #27

Open
@Shinning-Zhou

Description

@Shinning-Zhou

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions