FinRL_PaperTrading_Demo 出現Bug
man0819 opened this issue · 0 comments
train(start_date = '2022-08-25',
end_date = '2022-08-31',
ticker_list = ticker_list,
data_source = 'alpaca',
time_interval= '1Min',
technical_indicator_list= INDICATORS,
drl_lib='elegantrl',
env=env,
model_name='ppo',
if_vix=True,
API_KEY = "PKHZFTN4Y1XFEMWHK444",
API_SECRET = "EQ4AxGF3puTdMtMhTA0eGCDx4fDWbDvJD3ka8333",
API_BASE_URL = "https://paper-api.alpaca.markets/v2",
erl_params=ERL_PARAMS,
cwd='./papertrading_erl', #current_working_dir
break_step=1e5)
出以以下錯誤:
in train_agent(args)
308 env = build_env(args.env_class, args.env_args)
309 agent = args.agent_class(args.net_dims, args.state_dim, args.action_dim, gpu_id=args.gpu_id, args=args)
--> 310 agent.states = env.reset()[np.newaxis, :]
311
312 evaluator = Evaluator(eval_env=build_env(args.env_class, args.env_args),
TypeError: tuple indices must be integers or slices, not tuple
如何解決