ElegantRL icon indicating copy to clipboard operation
ElegantRL copied to clipboard

TypeError: __init__() got an unexpected keyword argument 'agent' in elegantrl_models.py

Open mhdmyz opened this issue 2 years ago • 3 comments

I get the following error while running the elegantrl_models.py:

TypeError: init() got an unexpected keyword argument 'agent' in the 58th line of /agents/elegantrl_models.py

I understand "agent" argument in Arguments class of config.py has been changed to "agent_class"

So when I change the "agent" argument in the elegantrl_models.py to "agent_class", I get the following error:

ValueError: too many values to unpack (expected 2), in the 107th line of elegantrl/train/run.py

mhdmyz avatar Aug 08 '22 15:08 mhdmyz

Recently, elegantRL is updated frequently. In config.py: def init(self, agent_class=None, env=None, env_func=None, env_args: dict = None):

pls add env_func

zhumingpassional avatar Aug 21 '22 04:08 zhumingpassional

env_func already exists! Can you clarify this?

mhdmyz avatar Aug 21 '22 15:08 mhdmyz

I do not know which explore_env is used.

In a version, it has two args: def explore_env(self, env, target_step) -> list:

pls check it.

thanks for reporting it.

zhumingpassional avatar Aug 22 '22 02:08 zhumingpassional