rail-berkeley / rlkit

Collection of reinforcement learning algorithms
MIT License
2.45k stars 550 forks source link

key error when run_policy #99

Closed ChenyangRan closed 4 years ago

ChenyangRan commented 4 years ago

Hi, I'm a beginner, and meet an error when testing the result. I have trained the _example/her/her__sac_gym_fetch_reacher.py._ I want to see the winow which showing the model, so I run the _runpolicy.py. However, the error is 'key error', and I haven't changed the code. Is there anyone help me? I have set the ptu.set_gpu_mode(True) to use GPU. 1584785675(1)

vitchyr commented 4 years ago

You should use the run_goal_conditioned_policy.py script instead of the run_policy.py script. Thanks for pointing that out. I've updated the README.

ChenyangRan commented 4 years ago

You should use the run_goal_conditioned_policy.py script instead of the run_policy.py script. Thanks for pointing that out. I've updated the README.

Thanks for your replay, but still errors when ### run_goal_conditioned_policy.py. I print the data['evaluation/env'], it's the num. Could you please help me again? I just use the cmd when training and the paras are default.

python example/her/her__sac_gym_fetch_reacher.py

Should I change something else?

image

vitchyr commented 4 years ago

Thanks. I fixed the script to use torch.load rather than pickle.load.

ChenyangRan commented 4 years ago

Thanks. I fixed the script to use torch.load rather than pickle.load.

It works well. Thanks very much.