AI4Finance-Foundation / AI4Finance-Foundation/ElegantRL

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

オープン
#197 コメント 1 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。