AI4Finance-Foundation / AI4Finance-Foundation/FinRL
Received ValueError while running China_A_share_market_tushare.ipynb.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 16.3k
- Fork
- 3.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm trying to move China_A_share_market_tushare.ipynb to run under the PyCharm environment, and replaced the data obtained from the tushare API with my own data. I encountered an error when running this line of code:
`env_train, _ = e_train_gym.get_sb_env()
`
The error message is as follows:
```
Traceback (most recent call last):
File "/Users/bicaihua/PycharmProjects/Quant/Gym.py", line 99, in
env_train, _ = e_train_gym.get_sb_env()
File "/Users/bicaihua/PycharmProjects/Quant/FinRL/finrl/meta/env_stock_trading/env_stocktrading.py", line 563, in get_sb_env
obs = e.reset()
File "/Users/bicaihua/PycharmProjects/Quant/venv/lib/python3.8/site-packages/stable_baselines3/common/vec_env/dummy_vec_env.py", line 75, in reset
self._save_obs(env_idx, obs)
File "/Users/bicaihua/PycharmProjects/Quant/venv/lib/python3.8/site-packages/stable_baselines3/common/vec_env/dummy_vec_env.py", line 105, in _save_obs
self.buf_obs[key][env_idx] = obs
ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 1.
```
It seems that there is a problem when the train is encapsulated into the DummyVecEnv class and then the reset operation is performed. But I printed the shape of the environment at every step, and it seems to be normal. Has anyone encountered a similar problem?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.