Skip to content

Commit

Permalink
Fixes #1010 and #1022 (#1034)
Browse files Browse the repository at this point in the history
* After [this](DLR-RM/stable-baselines3@9c338f9) by `stable-baselines3`, DummyVecEnv.reset() method passes a `seed` argument to its list of envs. Since StockTradingEnv.reset() does not expect any argument it results in an error. This commit fixes #1022.

* DummyVecEnv.render() no longer returns the expected state after [this](DLR-RM/stable-baselines3#1327) pull request got merged in `stable-baselines3`. This commit fixes #1010
  • Loading branch information
AkashKarnatak authored Jun 15, 2023
1 parent 5eaf7db commit 5dcac3a
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 5dcac3a

Please sign in to comment.