Skip to content

Commit

Permalink
DummyVecEnv.render() no longer returns the expected state after [this](
Browse files Browse the repository at this point in the history
…DLR-RM/stable-baselines3#1327) pull request got merged in `stable-baselines3`. This commit fixes AI4Finance-Foundation#1010
  • Loading branch information
AkashKarnatak committed Jun 10, 2023
1 parent c505d42 commit 311b1f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion finrl/agents/stablebaselines3/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def DRL_prediction(
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()
last_state = trade_env.envs[0].render()

df_last_state = pd.DataFrame({"last_state": last_state})
df_last_state.to_csv(f"results/last_state_{name}_{i}.csv", index=False)
Expand Down

0 comments on commit 311b1f4

Please sign in to comment.