Skip to content

Conversation

@abhishek47kashyap
Copy link

Adds close() to class HSREnv, which gets called by pfrl/envs/multiprocess_vector_env.py when Ctrl + C is used to interrupt/stop something (for example, training process in train_agent.py).

Without this, pfrl complains about missing env.close():

Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pfrl/envs/multiprocess_vector_env.py", line 36, in worker
    env.close()
AttributeError: 'GraspEnv' object has no attribute 'close'

The close() method simply disconnects from the server, as explained here.

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

Successfully merging this pull request may close these issues.

1 participant