AI4Finance-Foundation / AI4Finance-Foundation/FinRL-Meta
An error when running examples /FinRL_Ensemble_StockTrading_ICAIF_2020.ipynb
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 751
- PR merge metrics
- No merged PRs in 30d
Description
I was running the example in the title, and run into this error "If using all scalar values, you must pass an index". The error traces back to the code below and it is because trade_env.render() in finrl.agents.stablebaselines3.models.py returns None. It seems that the version of the stablebaselines3 I installed is not correct. Has anyone run into a similar issue?
```
for i in range(len(trade_data.index.unique())):
action, _states = model.predict(trade_obs)
trade_obs, rewards, dones, info = trade_env.step(action)
if i == (len(trade_data.index.unique()) - 2):
# print(env_test.render())
**last_state = trade_env.render()**
**df_last_state = pd.DataFrame({"last_state": last_state})**
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.