Closed Anupa-123 closed 8 months ago
it need to change to : agent.states = env.reset()[0][np.newaxis, :]
Thank you
all of the env.reset() you need to do the same env.reset()[0]
but I am still fighting to understand how everything is done, wish they had a manual.... it is sooo cryptic.... I been trying to modify the models, but they dont improve the learning....
Yes, model is showing error in every step. Thanks a lot for your help.
After modifying env.reset() to env.reset()[0] this error is resolved.
TypeError Traceback (most recent call last) in <cell line: 1>()
----> 1 train(start_date = '2022-08-25',
2 end_date = '2022-08-31',
3 ticker_list = ticker_list,
4 data_source = 'alpaca',
5 time_interval= '1Min',
2 frames 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