askforalfred / alfred

ALFRED - A Benchmark for Interpreting Grounded Instructions for Everyday Tasks
MIT License
360 stars 77 forks source link

Error when running evaluation: TypeError: string indices must be integers #65

Closed soyeonm closed 3 years ago

soyeonm commented 3 years ago

Hello, when I run the following command:

python3.8 models/eval/eval_seq2seq.py --model_path models/pre-trained_models/best_seen.pth --eval_split valid_seen --data data/json_2.1.0 --model models.model.seq2seq_im_mask --num_threads 1

I get the following error:

{'tests_seen': 1533, 'tests_unseen': 1529, 'train': 21023, 'valid_seen': 820, 'valid_unseen': 821} Loading: models/pre-trained_models/best_seen.pth Resetting ThorEnv Process Process-2: Traceback (most recent call last): File "/Users/soyeonmin/opt/anaconda3/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/Users/soyeonmin/opt/anaconda3/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/Volumes/Transcend/alfred/models/eval/eval_task.py", line 20, in run env = ThorEnv() File "/Volumes/Transcend/alfred/env/thor_env.py", line 29, in init super().init(quality=quality) File "/Users/soyeonmin/opt/anaconda3/lib/python3.8/site-packages/ai2thor/controller.py", line 454, in init event = self.reset(scene) File "/Volumes/Transcend/alfred/env/thor_env.py", line 61, in reset super().reset(scene_name) File "/Users/soyeonmin/opt/anaconda3/lib/python3.8/site-packages/ai2thor/controller.py", line 509, in reset if scene not in self.scenes_in_build: File "/Users/soyeonmin/opt/anaconda3/lib/python3.8/site-packages/ai2thor/controller.py", line 499, in scenes_in_build event = self.step(action='GetScenesInBuild') File "/Volumes/Transcend/alfred/env/thor_env.py", line 139, in step if "LookUp" in action['action']: TypeError: string indices must be integers

What is 'action' supposed to be? Is it supposed to be a string like 'GetScenesInBuild'? It seems that 'GetScenesInBuild' from ai2thor and your _thorenv.py are inconsistent. How can I avoid this problem? Thanks.

soyeonm commented 3 years ago

No worries, I resolved it by finding an existing closed issue!

Chenxi622 commented 5 months ago

hello,I have the same problem as you. Can I know in more detail how you finally solved it?