Skip to content

TypeError: 'Language' object is not subscriptable #16

@xwcn1228

Description

@xwcn1228

Traceback (most recent call last):
File "src/main.py", line 144, in
Algo.train(round_n)
File "/mnt/2T/wwy/CreamFL-main/src/algorithms/MMFL.py", line 284, in train
trainer.run(self.global_img_feature, self.global_txt_feature, self.distill_index,
File "/mnt/2T/wwy/CreamFL-main/./src/algorithms/ClientTrainer.py", line 215, in run
self.tra(global_img_feature, global_txt_feature, distill_index, global_train_loader)
File "/mnt/2T/wwy/CreamFL-main/./src/algorithms/ClientTrainer.py", line 359, in tra
for i, data in enumerate(self.train_loader):
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 681, in next
data = self._next_data()
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1376, in _next_data
return self._process_data(data)
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1402, in _process_data
data.reraise()
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
raise exception
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/fyl/anaconda3/envs/creamfl/lib/python3.8/site-packages/torch/utils/data/dataset.py", line 290, in getitem
return self.dataset[self.indices[idx]]
TypeError: 'Language' object is not subscriptable

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