AI4Finance-Foundation / FinRL-Meta

FinRL­-Meta: Dynamic datasets and market environments for FinRL.
https://ai4finance.org
MIT License
1.2k stars 560 forks source link

__init__() got an unexpected keyword augument 'agent' #202

Open tmgondal opened 2 years ago

tmgondal commented 2 years ago

While working on [FinRL_MultiCrypto_Trading.ipynb]: I am experiencing this issue:

/FinRL-Meta/agents/elegantrl_models.py in get_model(self, model_name, model_kwargs) 57 if model_name not in MODELS: 58 raise NotImplementedError("NotImplementedError") ---> 59 model = Arguments(agent=agent, env=env) 60 model.if_off_policy = model_name in OFF_POLICY_MODELS 61 if model_kwargs is not None:

TypeError: init() got an unexpected keyword argument 'agent'

ZiyiXia commented 2 years ago

That is related to ElegantRL, anyone familiar with ElegantRL could have a look?

shixun404 commented 2 years ago

I think this is related to the modification of class Arguments. Maybe you can have a look at https://github.com/AI4Finance-Foundation/ElegantRL/blob/5dbfb6037b4201aa2f8b5b6b855b04a303b18581/elegantrl/train/config.py#L11 Screenshot 2022-07-26 220400