AI4Finance-Foundation / AI4Finance-Foundation/FinRL
stable-baselines3 ValueError when creating DummyVecEnv
- Dominant language
- Jupyter Notebook
- Stars
- 16.3k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
When running:
df_summary = ensemble_agent.run_ensemble_strategy(A2C_model_kwargs,
PPO_model_kwargs,
DDPG_model_kwargs,
timesteps_dict)
I run into this issue:
https://github.com/DLR-RM/stable-baselines3/issues/1151
"You tried to create multiple environments, but the function to create them returned the same instance "
"instead of creating different objects. "
"You are probably using `make_vec_env(lambda: env)` or `DummyVecEnv([lambda: env] * n_envs)`. "
"You should replace `lambda: env` by a `make_env` function that "
"creates a new instance of the environment at every call "
"(using `gym.make()` for instance). You can take a look at the documentation for an example. "
"Please read https://github.com/DLR-RM/stable-baselines3/issues/1151 for more information."
in this spot:
https://github.com/AI4Finance-Foundation/FinRL/blob/7414adb012b554f7c684d4615830dc5c31a094d1/finrl/agents/stablebaselines3/models.py#L287-L310
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.