Skip to content

AttributeError: 'Config' object has no attribute 'num_envs' #469

@marcuswang6

Description

@marcuswang6

~/anaconda3/envs/ai4finance/lib/python3.8/site-packages/elegantrl/agents/AgentSAC.py in init(self, net_dims, state_dim, action_dim, gpu_id, args)
15 self.act_class = getattr(self, 'act_class', ActorSAC)
16 self.cri_class = getattr(self, 'cri_class', CriticTwin)
---> 17 super().init(net_dims=net_dims, state_dim=state_dim, action_dim=action_dim, gpu_id=gpu_id, args=args)
18 self.cri_target = deepcopy(self.cri)
19

~/anaconda3/envs/ai4finance/lib/python3.8/site-packages/elegantrl/agents/AgentBase.py in init(self, net_dims, state_dim, action_dim, gpu_id, args)
21 def init(self, net_dims: [int], state_dim: int, action_dim: int, gpu_id: int = 0, args: Config = Config()):
22 self.gamma = args.gamma # discount factor of future rewards
---> 23 self.num_envs = args.num_envs # the number of sub envs in vectorized env. num_envs=1 in single env.
24 self.batch_size = args.batch_size # num of transitions sampled from replay buffer.
25 self.repeat_times = args.repeat_times # repeatedly update network using ReplayBuffer

AttributeError: 'Config' object has no attribute 'num_envs'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions