opendilab / DI-engine

OpenDILab Decision AI Engine
https://di-engine-docs.readthedocs.io
Apache License 2.0
2.79k stars 348 forks source link

KeyError: 'obs_shape' #812

Closed WangJuan6 closed 1 week ago

WangJuan6 commented 1 week ago

Dear Author, I run the code by python ding/example/mappo.py, but I got an error:

Traceback (most recent call last):
  File "/data/projects/20240701/DI-engine/ding/example/mappo.py", line 45, in <module>
    main()
  File "/data/projects/20240701/DI-engine/ding/example/mappo.py", line 36, in main
    task.use(gae_estimator(cfg, policy.collect_mode))
  File "/home/wj/anaconda3/envs/di/lib/python3.9/site-packages/ding/framework/middleware/functional/advantage_estimator.py", line 35, in gae_estimator
    obs_shape = cfg['policy']['model']['obs_shape']
KeyError: 'obs_shape'

Can you help me to solve this problem? Thanks

PaParaZz1 commented 1 week ago

Thanks for your feedback! We have fixed this problem in the latest commit.

WangJuan6 commented 1 week ago

It works, thank you!