fix: comment out some blocks to debug & thread join()
This commit is contained in:
parent
d35ee68ccb
commit
7f650d0673
@ -191,11 +191,11 @@ class ClusterCommunicationModule():
|
||||
print(f"Worker {conn_index} run")
|
||||
for i in range(7):
|
||||
print(f"[WORKER {conn_index}] {i}")
|
||||
time.sleep(1)
|
||||
print(f"Worker {conn_index} finished")
|
||||
|
||||
threads = []
|
||||
master_t = threading.Thread(target=master_run, args=(image_name, ))
|
||||
master_t.join()
|
||||
threads.append(master_t)
|
||||
|
||||
for index, conn in enumerate(self.worker_conns):
|
||||
@ -204,11 +204,12 @@ class ClusterCommunicationModule():
|
||||
print(command)
|
||||
|
||||
t = threading.Thread(target=send_and_wait, args=(index, conn, image_name))
|
||||
t.join()
|
||||
threads.append(t)
|
||||
|
||||
for thread in threads:
|
||||
thread.start()
|
||||
for thread in threads:
|
||||
thread.join()
|
||||
|
||||
print("[INFO] All workers finished.")
|
||||
|
||||
|
||||
@ -85,6 +85,7 @@ class NodeManager():
|
||||
print(f"And we have load your wallet private key {WALLET_KEY} (address={self.wallet.address})")
|
||||
print()
|
||||
if self.w3.is_connected():
|
||||
'''
|
||||
print("[INFO] Connected Successfully.")
|
||||
print()
|
||||
|
||||
@ -116,6 +117,9 @@ class NodeManager():
|
||||
print("\n[INFO] You Receive a new task:")
|
||||
print(f" - Download Image: {data_image}")
|
||||
print(f" - Training Image: {train_image}")
|
||||
'''
|
||||
|
||||
data_image = "test/test"
|
||||
|
||||
# Start Downloading
|
||||
self.cluster_communication_module.run_container(data_image)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user