Browse Source

print-out PIDs

justheuristic 4 years ago
parent
commit
ef47ff81c5
2 changed files with 2 additions and 0 deletions
  1. 1 0
      hivemind/averaging/averager.py
  2. 1 0
      hivemind/dht/__init__.py

+ 1 - 0
hivemind/averaging/averager.py

@@ -203,6 +203,7 @@ class DecentralizedAverager(mp.Process, ServicerBase):
         Turns out, using a non-main thread creates a separate OMP pool that works even if the original pool is corrupted
         Read more: https://github.com/pytorch/pytorch/issues/17199
         """
+        print(f"RUNNING AVERAGER WITH PID={self.pid}")
         thread = threading.Thread(target=self._run_internal, daemon=True)
         thread.start()
         thread.join()

+ 1 - 0
hivemind/dht/__init__.py

@@ -102,6 +102,7 @@ class DHT(mp.Process):
 
     def run(self) -> None:
         """Serve DHT forever. This function will not return until DHT node is shut down"""
+        print(f"RUNNING DHT WITH PID={self.pid}")
         loop = switch_to_uvloop()
 
         with ThreadPoolExecutor(max_workers=1) as pipe_awaiter: