Skip to content
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

Error on get df_sumary #9

Open
itlpps opened this issue May 22, 2023 · 2 comments
Open

Error on get df_sumary #9

itlpps opened this issue May 22, 2023 · 2 comments

Comments

@itlpps
Copy link

itlpps commented May 22, 2023

On execute this code:

df_summary = ensemble_agent.run_ensemble_strategy(A2C_model_kwargs,
                                                 PPO_model_kwargs,
                                                 DDPG_model_kwargs,
                                                 timesteps_dict)

I get this error:

============Start Ensemble Strategy============
============================================
turbulence_threshold:  234.1933647436273
======Model training from:  2013-01-01 to  2022-05-02
======A2C Training========
{'n_steps': 5, 'ent_coef': 0.005, 'learning_rate': 0.0007}
Using cuda device
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[34], line 1
----> 1 df_summary = ensemble_agent.run_ensemble_strategy(A2C_model_kwargs,
      2                                                  PPO_model_kwargs,
      3                                                  DDPG_model_kwargs,
      4                                                  timesteps_dict)

File [~/.local/lib/python3.10/site-packages/finrl/agents/stablebaselines3/models.py:469](https://file+.vscode-resource.vscode-cdn.net/home/pczin/Documents/projects/ChatGPT_Trading_Bot/~/.local/lib/python3.10/site-packages/finrl/agents/stablebaselines3/models.py:469), in DRLEnsembleAgent.run_ensemble_strategy(self, A2C_model_kwargs, PPO_model_kwargs, DDPG_model_kwargs, timesteps_dict)
    465 print("======A2C Training========")
    466 model_a2c = self.get_model(
    467     "a2c", self.train_env, policy="MlpPolicy", model_kwargs=A2C_model_kwargs
    468 )
--> 469 model_a2c = self.train_model(
    470     model_a2c,
    471     "a2c",
    472     tb_log_name=f"a2c_{i}",
    473     iter_num=i,
    474     total_timesteps=timesteps_dict["a2c"],
    475 )  # 100_000
    477 print(
    478     "======A2C Validation from: ",
    479     validation_start_date,
    480     "to ",
    481     validation_end_date,
...
---> 76         obs, self.reset_infos[env_idx] = self.envs[env_idx].reset(seed=self._seeds[env_idx])
     77         self._save_obs(env_idx, obs)
     78     # Seeds are only used once

TypeError: StockTradingEnv.reset() got an unexpected keyword argument 'seed'

Any solution?

@zchris07
Copy link

Same. Any progress on this?

@acidtib
Copy link

acidtib commented Apr 29, 2024

heres a solution

AI4Finance-Foundation/FinRL#1202 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants