Advertisement
Guest User

Untitled

a guest
Jul 12th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. RuntimeError Traceback (most recent call last)
  2. <ipython-input-6-65cf6c4890a8> in <module>()
  3. 3
  4. 4 nuts_kernel = NUTS(model, max_tree_depth=5)
  5. ----> 5 posterior = MCMC(nuts_kernel, num_samples=500, warmup_steps=2000, num_chains=5).run(x, y)
  6. 6
  7. 7 mw1 = EmpiricalMarginal(posterior, sites=["module$$$fc1_mean.weight"])._get_samples_and_weights()[0].cpu().detach().numpy()
  8.  
  9. ~/anaconda3/lib/python3.6/site-packages/pyro/infer/abstract_infer.py in run(self, *args, **kwargs)
  10. 221 self._reset()
  11. 222 with poutine.block():
  12. --> 223 for i, vals in enumerate(self._traces(*args, **kwargs)):
  13. 224 if len(vals) == 2:
  14. 225 chain_id = 0
  15.  
  16. ~/anaconda3/lib/python3.6/site-packages/pyro/infer/mcmc/mcmc.py in _traces(self, *args, **kwargs)
  17. 266
  18. 267 def _traces(self, *args, **kwargs):
  19. --> 268 for sample in self.sampler._traces(*args, **kwargs):
  20. 269 yield sample
  21. 270
  22.  
  23. ~/anaconda3/lib/python3.6/site-packages/pyro/infer/mcmc/mcmc.py in _traces(self, *args, **kwargs)
  24. 160 while active_workers:
  25. 161 try:
  26. --> 162 chain_id, val = self.result_queue.get(timeout=5)
  27. 163 self.events[chain_id].set()
  28. 164 except queue.Empty:
  29.  
  30. ~/anaconda3/lib/python3.6/multiprocessing/queues.py in get(self, block, timeout)
  31. 111 self._rlock.release()
  32. 112 # unserialize the data after having released the lock
  33. --> 113 return _ForkingPickler.loads(res)
  34. 114
  35. 115 def qsize(self):
  36.  
  37. ~/anaconda3/lib/python3.6/site-packages/torch/multiprocessing/reductions.py in rebuild_storage_fd(cls, df, size)
  38. 274 fd = multiprocessing.reduction.rebuild_handle(df)
  39. 275 else:
  40. --> 276 fd = df.detach()
  41. 277 try:
  42. 278 storage = storage_from_cache(cls, fd_id(fd))
  43.  
  44. ~/anaconda3/lib/python3.6/multiprocessing/resource_sharer.py in detach(self)
  45. 56 '''Get the fd. This should only be called once.'''
  46. 57 with _resource_sharer.get_connection(self._id) as conn:
  47. ---> 58 return reduction.recv_handle(conn)
  48. 59
  49. 60
  50.  
  51. ~/anaconda3/lib/python3.6/multiprocessing/reduction.py in recv_handle(conn)
  52. 180 '''Receive a handle over a local connection.'''
  53. 181 with socket.fromfd(conn.fileno(), socket.AF_UNIX, socket.SOCK_STREAM) as s:
  54. --> 182 return recvfds(s, 1)[0]
  55. 183
  56. 184 def DupFd(fd):
  57.  
  58. ~/anaconda3/lib/python3.6/multiprocessing/reduction.py in recvfds(sock, size)
  59. 159 if len(ancdata) != 1:
  60. 160 raise RuntimeError('received %d items of ancdata' %
  61. --> 161 len(ancdata))
  62. 162 cmsg_level, cmsg_type, cmsg_data = ancdata[0]
  63. 163 if (cmsg_level == socket.SOL_SOCKET and
  64.  
  65. RuntimeError: received 0 items of ancdata
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement