modestyachts / ARS

An implementation of the Augmented Random Search algorithm
Other
418 stars 103 forks source link

can not run the expert policy #11

Closed JiahaoYao closed 3 years ago

JiahaoYao commented 5 years ago

Hi, I run the expert policy python run_policy.py ../trained_policies/Humanoid-v1/policy_reward_11600/lin_policy_plus.npz Humanoid-v1 --render --num_rollouts 20 and stuck at the first few lines.

I got the error like this:

loading and building expert policy
Traceback (most recent call last):
  File "run_policy.py", line 62, in <module>
    main()
  File "run_policy.py", line 23, in main
    lin_policy = lin_policy.items()[0][1]
TypeError: 'ItemsView' object does not support indexing

Could anyone tell me how to fix this?

huangrenke commented 4 years ago

I have the same problem....

Roadsong commented 3 years ago

Try np.load(something, allow_pickle=True)

JiahaoYao commented 3 years ago

thanks @Roadsong !