zuoxingdong / lagom

lagom: A PyTorch infrastructure for rapid prototyping of reinforcement learning algorithms.
MIT License
373 stars 30 forks source link

Support __getattr__ to VecEnv like Env in gym #175

Closed zuoxingdong closed 5 years ago

zuoxingdong commented 5 years ago
   def __getattr__(self, name):
        if name.startswith('_'):
            raise AttributeError("attempted to get missing private attribute '{}'".format(name))
        return getattr(self.venv, name)