Skip to content

Commit 5dcac3a

Browse files
Fixes #1010 and #1022 (#1034)
* 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
1 parent 5eaf7db commit 5dcac3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

finrl/agents/stablebaselines3/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def DRL_prediction(
316316
trade_obs, rewards, dones, info = trade_env.step(action)
317317
if i == (len(trade_data.index.unique()) - 2):
318318
# print(env_test.render())
319-
last_state = trade_env.render()
319+
last_state = trade_env.envs[0].render()
320320

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

0 commit comments

Comments
 (0)