jidiai / ai_lib

MIT License
158 stars 87 forks source link

样例就跑不通 #101

Open zx081325 opened 1 year ago

zx081325 commented 1 year ago

python main.py --scenario classic_CartPole-v0 --algo dqn就各种报错

zx081325 commented 1 year ago

/root/.pyenv/versions/3.7.5/lib/python3.7/site-packages/gym/envs/registration.py:556: UserWarning: WARN: The environment CartPole-v0 is out of date. You should consider upgrading to version v1. f"The environment {id} is out of date. You should consider " /root/my_ai_lib/env/ccgame.py:22: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray observation = np.array(observation) joint action space is Discrete(2) Traceback (most recent call last): File "examples/main.py", line 23, in runner = Runner(args) File "/root/my_ai_lib/examples/runner.py", line 87, in init self.agent = SingleRLAgent(self.paras) File "/root/my_ai_lib/examples/agents/singleagent.py", line 24, in init self.algo = ini_agents(args) File "/root/my_ai_lib/examples/agents/singleagent.py", line 16, in ini_agents agent = getattr(agent_file_import, agent_class_name)(args) File "/root/my_ai_lib/examples/algo/dqn/dqn.py", line 38, in init num_hidden_layer=args.num_hidden_layer, AttributeError: 'types.SimpleNamespace' object has no attribute 'num_hidden_layer'