AI4Finance-Foundation / AI4Finance-Foundation/ElegantRL

ElegantRL breaking change result in error for FinRL and FinRL-Meta

未关闭
#197 1 条评论 0 个 reaction 已指派 1 人 已被 @zhumingpassional 认领 在 GitHub 查看
bug
主要语言
Python
星标
4.4k
派生
978
PR 合并指标
30 天内没有已合并 PR

描述

Hello, following this commit: https://github.com/AI4Finance-Foundation/ElegantRL/commit/c1d66a81f0fcc804f2dc3d13b8834a6cad1494bc
A Breaking change was added:
![image](https://user-images.githubusercontent.com/63861105/181918807-3f330cd5-e901-47d5-879e-68c699744fb4.png)
The constructor of Arguments now expect `agent_class` instead of `agent`.
However FinRL and FinRL-Meta are still using the old Arguments constructor style.
For example [here in FinRL](https://github.com/AI4Finance-Foundation/FinRL/blob/HEAD/finrl/agents/elegantrl/models.py#L63) or [here in FinRl-Meta](https://github.com/AI4Finance-Foundation/FinRL-Meta/blob/HEAD/meta/env_stock_trading/env_stock_papertrading.py#L45)
Which produce this error:
```
[/FinRL-Meta/agents/elegantrl_models.py](https://localhost:8080/#) in get_model(self, model_name, model_kwargs)
56 if model_name not in MODELS:
57 raise NotImplementedError("NotImplementedError")
---> 58 model = Arguments(agent=agent, env=env)
59 model.if_off_policy = model_name in OFF_POLICY_MODELS
60 if model_kwargs is not None:

TypeError: __init__() got an unexpected keyword argument 'agent'
```
To reproduce the error you can simply run https://github.com/AI4Finance-Foundation/FinRL/blob/master/tutorials/3-Practical/FinRL_MultiCrypto_Trading.ipynb in google colab.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。