Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

AttributeError: 'ParameterServer' object has no attribute 'pc' #41

Closed
ch3njust1n opened this issue Apr 18, 2018 · 2 comments
Closed

AttributeError: 'ParameterServer' object has no attribute 'pc' #41

ch3njust1n opened this issue Apr 18, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ch3njust1n
Copy link
Owner

Traceback (most recent call last):
  File "/home/ubuntu/anaconda2/envs/smpl/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/home/ubuntu/anaconda2/envs/smpl/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/smpl/distributed/parameter_server.py", line 183, in __receive
    self.pc.remove('{}:{}'.format(addr[0], addr[1]))
AttributeError: 'ParameterServer' object has no attribute 'pc'
@ch3njust1n ch3njust1n added the bug Something isn't working label Apr 19, 2018
@ch3njust1n ch3njust1n self-assigned this Apr 19, 2018
@ch3njust1n
Copy link
Owner Author

ch3njust1n commented Apr 20, 2018

When a process is created, are the constructor attributes not carried over? Why does this issue not occur with self.cache?

Process Process-1:1:
Traceback (most recent call last):
  File "/home/ubuntu/anaconda2/envs/smpl/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/home/ubuntu/anaconda2/envs/smpl/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/smpl/distributed/parameter_server.py", line 395, in __train
    self.__allreduce(sess_id, multistep, share[sess_id]['train_size'], log)
  File "/home/ubuntu/smpl/distributed/parameter_server.py", line 427, in __allreduce
    Thread(target=self.pc.send,
AttributeError: 'ParameterServer' object has no attribute 'pc'

@ch3njust1n
Copy link
Owner Author

Fixed by instantiating self.pc before ps.listen() so that pc is added to ParameterServer attributes and so part of copied memory in new processes

ch3njust1n added a commit that referenced this issue Apr 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant