yangkevin2 / neurips2021-lap3

17 stars 0 forks source link

issues 1: #2

Open xinhongri opened 3 years ago

xinhongri commented 3 years ago

xvfb-run -a -s "-screen 0 1024x768x24 -ac +extension GLX +render -noreset" python -u main.py --env MiniWorld-MazeS3-v0 --num_threads 1 --num_trials 1 --method lamcts-planning --Cp 2 --horizon 216 --replan_freq 216 --iterations 2000 --final_obs_split --latent --latent_model cnn --latent_ckpt None --init_sigma_mult 8 Warning: molecule dependencies not installed; install if running molecule exps 0%| | 0/1 [00:00<?, ?it/s]Falling back to num_samples=1 Falling back to num_samples=1 max episode steps 216 0 0%| | 0/1 [00:04<?, ?it/s] Traceback (most recent call last): File "main.py", line 181, in main(args) File "main.py", line 101, in main returns.append(run_trial((args, i))) File "main.py", line 51, in run_trial plan, all_samples = planning_method(env, env_info, args) File "/home/vision/anaconda3/envs/pytorch/lib/python3.6/site-packages/lamcts_planning-0.1-py3.6.egg/lamcts_planning/methods/lamcts_plan/lamcts_plan.py", line 68, in plan verbose=args.verbose File "/srv/hd2/pycharm_torch1/plalam/lamcts_planning/lamcts_utils/MCTS.py", line 66, in init self.init_train() File "/srv/hd2/pycharm_torch1/plalam/lamcts_planning/lamcts_utils/MCTS.py", line 163, in init_train v = self.collect_samples(point) File "/srv/hd2/pycharm_torch1/plalam/lamcts_planning/lamcts_utils/MCTS.py", line 140, in collect_samples value, split_info, final_obs = self.func(sample, return_final_obs=True) File "/home/vision/anaconda3/envs/pytorch/lib/python3.6/site-packages/lamcts_planning-0.1-py3.6.egg/lamcts_planning/methods/lamcts_plan/lamcts_plan.py", line 30, in call returns, split_info, final_obs = rollout(self.env, self.env_info, action_seq, self.gamma, return_final_obs=True, action_seq_split=self.action_seq_split) File "/home/vision/anaconda3/envs/pytorch/lib/python3.6/site-packages/lamcts_planning-0.1-py3.6.egg/lamctsplanning/util.py", line 151, in rollout , r, done, final_smiles = simul_env.step(action) File "/home/vision/anaconda3/envs/pytorch/lib/python3.6/site-packages/gym_miniworld/envs/maze.py", line 107, in step obs, reward, done, info = super().step(action) File "/home/vision/anaconda3/envs/pytorch/lib/python3.6/site-packages/gym_miniworld/miniworld.py", line 670, in step if action == self.actions.move_forward: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

yangkevin2 commented 3 years ago

Hi,

Based on the error, it seems like this is caused by using the reference gym-miniworld at https://github.com/maximecb/gym-miniworld rather than our modified version, which is inside the repo. Can you retry with our version?

xinhongri commented 3 years ago

No, I used your version not the reference

xinhongri commented 3 years ago

yours is gym-miniworld which cannot be imported, as the name in the code is gym_miniworld, so I have to change the name

yangkevin2 commented 3 years ago

How are you installing it? I tested it yesterday and it worked without changes. To install, I'm running "pip install -e ." inside the gym-miniworld folder.