-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: If using all scalar values, you must pass an index #1010
Comments
Also facing the same error |
same issue |
Yeah, the same issue after "pip install stable-baselines3==2.0.0a5" ======DDPG Validation from: 2021-10-04 to 2022-01-03 Then the following error raised: ValueError Traceback (most recent call last) File d:\ProgramData\Anaconda3\envs\develop\lib\site-packages\finrl\agents\stablebaselines3\models.py:668, in DRLEnsembleAgent.run_ensemble_strategy(self, A2C_model_kwargs, PPO_model_kwargs, DDPG_model_kwargs, timesteps_dict) File d:\ProgramData\Anaconda3\envs\develop\lib\site-packages\finrl\agents\stablebaselines3\models.py:321, in DRLEnsembleAgent.DRL_prediction(self, model, name, last_state, iter_num, turbulence_threshold, initial) File d:\ProgramData\Anaconda3\envs\develop\lib\site-packages\pandas\core\frame.py:636, in DataFrame.init(self, data, index, columns, dtype, copy) File d:\ProgramData\Anaconda3\envs\develop\lib\site-packages\pandas\core\internals\construction.py:502, in dict_to_mgr(data, index, columns, dtype, typ, copy) File d:\ProgramData\Anaconda3\envs\develop\lib\site-packages\pandas\core\internals\construction.py:120, in arrays_to_mgr(arrays, columns, index, dtype, verify_integrity, typ, consolidate) File d:\ProgramData\Anaconda3\envs\develop\lib\site-packages\pandas\core\internals\construction.py:664, in _extract_index(data) ValueError: If using all scalar values, you must pass an index |
Yeah, the same issue after "pip install stable-baselines3==2.0.0a5" ======DDPG Validation from: 2021-10-04 to 2022-01-03 Then the following error raised: |
Likewise. Same problem after the suggested fix in #1022 |
This commit by
to
fixes the error. |
…DLR-RM/stable-baselines3#1327) pull request got merged in `stable-baselines3`. This commit fixes AI4Finance-Foundation#1010
ValueError: operands could not be broadcast together with shapes (30,) (29,)Facing the following error when running: df_summary = ensemble_agent.run_ensemble_strategy(A2C_model_kwargs, Does anyone know how to fix it? ================================================================================== Full Error:ValueError Traceback (most recent call last) 5 frames /usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/dummy_vec_env.py in init(self, env_fns) /usr/local/lib/python3.10/dist-packages/stable_baselines3/common/vec_env/dummy_vec_env.py in (.0) /usr/local/lib/python3.10/dist-packages/finrl/agents/stablebaselines3/models.py in () /usr/local/lib/python3.10/dist-packages/finrl/meta/env_stock_trading/env_stocktrading.py in init(self, df, stock_dim, hmax, initial_amount, num_stock_shares, buy_cost_pct, sell_cost_pct, reward_scaling, state_space, action_space, tech_indicator_list, turbulence_threshold, risk_indicator_col, make_plots, print_verbosity, day, initial, previous_state, model_name, mode, iteration) /usr/local/lib/python3.10/dist-packages/finrl/meta/env_stock_trading/env_stocktrading.py in _initiate_state(self) ValueError: operands could not be broadcast together with shapes (30,) (29,) |
ValueError Traceback (most recent call last)
in <cell line: 5>()
3
4 # Run ensemble strategy and store the result
----> 5 result = ensemble_agent.run_ensemble_strategy(A2C_model_kwargs,
6 PPO_model_kwargs,
7 DDPG_model_kwargs,
5 frames
/usr/local/lib/python3.10/site-packages/pandas/core/internals/construction.py in _extract_index(data)
643
644 if not indexes and not raw_lengths:
--> 645 raise ValueError("If using all scalar values, you must pass an index")
646
647 if have_series:
ValueError: If using all scalar values, you must pass an index
I have try many way to fix it, but no luck, any one have any idea ?
The text was updated successfully, but these errors were encountered: