DeepX-inc / machina

Control section: Deep Reinforcement Learning framework
MIT License
278 stars 45 forks source link

Example code does not run anymore #180

Closed pwuethri closed 5 years ago

pwuethri commented 5 years ago

I tried to run my distillation code but ran into this problem:

`2019-03-12 12:57:14.387380 JST | Optimizing... Traceback (most recent call last): File "run_ppo.py", line 160, in optim_pol=optim_pol, optim_vf=optim_vf, epoch=args.epoch_per_iter, batch_size=args.batch_size, max_grad_norm=args.max_grad_norm) File "/home/pierre/anaconda3/lib/python3.7/site-packages/machina-0.2.0-py3.7.egg/machina/algos/ppo_clip.py", line 126, in train for batch in iterator: File "/home/pierre/anaconda3/lib/python3.7/site-packages/machina-0.2.0-py3.7.egg/machina/traj/traj.py", line 182, in iterate indices = self._get_indices(indices, shuffle) File "/home/pierre/anaconda3/lib/python3.7/site-packages/machina-0.2.0-py3.7.egg/machina/traj/traj.py", line 128, in _get_indices self.num_step, device=get_device(), dtype=torch.long) TypeError: arange() received an invalid combination of arguments - got (numpy.int64, dtype=torch.dtype, device=torch.device), but expected one of:

I also ran run_ppo.py and got the same issue. I think that something got changed in the trajectories file which affects all scripts

rarilurelo commented 5 years ago

Please update your pytorch pip install --upgrade torch