AI4Finance-Foundation / AI4Finance-Foundation/FinRL

issue with stable-baselines3 and eleganrl enviroment

未關閉
#1,155 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Jupyter Notebook
星號
16.3k
分支
3.5k
PR 合併指標
30 天內沒有已合併 PR

描述

**Describe the bug**
Now finrl use gymnasium which returns 5 parameters in step function like below image
![image](https://github.com/AI4Finance-Foundation/FinRL/assets/66534506/72016b62-6fbf-42a5-9840-c78c5f796d31)

and 2 parameters from reset method
![image](https://github.com/AI4Finance-Foundation/FinRL/assets/66534506/074c572b-667c-417b-8898-fa85277c04ea)

taking refrence of this enviroment `finrl/meta/env_stock_trading/env_stocktrading.py`

but to use elegantrl for same enviroment it shows an error below
![image](https://github.com/AI4Finance-Foundation/FinRL/assets/66534506/d9d60bff-5eed-4647-8039-21af898e356e)

I fixed this error by removing `return self.state, self.reward, self.terminal, False, {}
changed to
return self.state, self.reward, self.terminal, {} ` from step function and

`
return self.state, {}
changed to
return self.state
`
from reset function from this finrl/meta/env_stock_trading/env_stocktrading.py enviromnet

but if I do this elegantrl works fine but instead of gymanisum I have to use gym to train stablebaselines3 and eleganrl model

I think it is an issue with eleganrl which is not compile with gymnasium and finrl enviroment code is written on stable-baselines3 only.

need some good suggestion !

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。