Closed jnqian99 closed 2 months ago
I have tried to run the code (for the simulator), but I wasn't able to do it. here some general suggestions: 1- correct the pathes, do not put absolute values, always put the value relative to the root (ORL_OPTIMZER) one example is your readme in sumulators instead of python ./simulators/env_plot.py --config ./config/env_halfcheetah_medium_v2.yaml
should be changed to python TORL/simulators/env_plot.py --config TORL/config/env_halfcheetah_medium_v2.yaml
the same goes for the yaml file: chkpt_path_nar: TORL/config/halfcheetah_medium_v2_nar.pt chkpt_path_ar: TORL/config/halfcheetah_medium_v2_ar.pt
This will help to never put absolute values, like in sumulator/env_util_offline or simulators/env_util
The second issue is about devices. Are you running on GPU? if you are not try to connect to lab. If yes, you should alread sopt the issue with the following code for simulator: python TORL/simulators/env_plot.py --config TORL/config/env_halfcheetah_medium_v2.yaml
I have changed the code in envmod in lline 54 as folllow: state= state[:,:self.sequence_num,:].to(self.device) state = state.to(self.device) action = action.to(self.device)
the problem still exist, please check if the code run on GPU
File "/localhome/pagand/anaconda3/envs/orl/lib/python3.10/site-packages/torch/nn/modules/rnn.py", line 878, in forward result = _VF.lstm(input, hx, self._flat_weights, self.bias, self.num_layers, RuntimeError: Input and parameter tensors are not at the same device, found input tensor at cpu and parameter tensor at cuda:0
@jnqian99 Any update on this pull request?
modifications to OtherModels