We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, great article once again,
I am trying to predict using trained models but get the same error in both single and multi stock scenarios. When I run prediction:
trade = data_split(processed_full, '2019-01-01','2021-01-01') e_trade_gym = StockTradingEnv(df = trade, turbulence_threshold = 332, **env_kwargs) df_account_value, df_actions = DRLAgent.DRL_prediction(model=model_sac, environment = e_trade_gym)
the code above gives this error ValueError: Length mismatch: Expected axis has 0 elements, new values have 1 elements
the error happens in this location: ~\Anaconda3\envs\py36\lib\site-packages\finrl\model\models.py in DRL_prediction(model, environment) 78 action, _states = model.predict(test_obs) 79 account_memory = test_env.env_method(method_name="save_asset_memory") ---> 80 actions_memory = test_env.env_method(method_name="save_action_memory") 81 test_obs, rewards, dones, info = test_env.step(action) 82 if dones[0]:
I am using Jupyter notebook downloaded as of Feb 9, 2021, something must have changed in the modules since you ran it Thanks Vadim
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, great article once again,
I am trying to predict using trained models but get the same error in both single and multi stock scenarios.
When I run prediction:
trade = data_split(processed_full, '2019-01-01','2021-01-01')
e_trade_gym = StockTradingEnv(df = trade, turbulence_threshold = 332, **env_kwargs)
df_account_value, df_actions = DRLAgent.DRL_prediction(model=model_sac, environment = e_trade_gym)
the code above gives this error
ValueError: Length mismatch: Expected axis has 0 elements, new values have 1 elements
the error happens in this location:
~\Anaconda3\envs\py36\lib\site-packages\finrl\model\models.py in DRL_prediction(model, environment)
78 action, _states = model.predict(test_obs)
79 account_memory = test_env.env_method(method_name="save_asset_memory")
---> 80 actions_memory = test_env.env_method(method_name="save_action_memory")
81 test_obs, rewards, dones, info = test_env.step(action)
82 if dones[0]:
I am using Jupyter notebook downloaded as of Feb 9, 2021, something must have changed in the modules since you ran it
Thanks
Vadim
The text was updated successfully, but these errors were encountered: