fix: some ui commands
This commit is contained in:
parent
6093742092
commit
b24d96ba7c
@ -85,7 +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("Connected Successfully.")
|
||||
print("[INFO] Connected Successfully.")
|
||||
print()
|
||||
|
||||
# Register the cluster
|
||||
@ -94,7 +94,7 @@ class NodeManager():
|
||||
print(f"\nWe will register this cluster({self.GPU} * {gpu_num})...")
|
||||
receipt = self.scheduler.register_cluster(self.wallet, gpu_id, gpu_num)
|
||||
event = self.scheduler.get_cluster_event(receipt)
|
||||
print("\nOK. this is our cluster event on the blockchain")
|
||||
print("\n[INFO] Register our cluster succefully. \nThis is our cluster event on the blockchain: ")
|
||||
print(f" {event[0]['args']}")
|
||||
|
||||
# start waiting
|
||||
@ -103,9 +103,22 @@ class NodeManager():
|
||||
print("Ctrl+C to stop the waiting...")
|
||||
try:
|
||||
next_task = self.scheduler.listen_task(self.wallet.address)
|
||||
print(next_task)
|
||||
|
||||
except:
|
||||
print("[STOP] stop the waiting")
|
||||
print("[INFO] stop the waiting")
|
||||
return
|
||||
|
||||
# get task info
|
||||
task_index = next_task['args']['taskIndex']
|
||||
data_image = next_task['args']['dataImage']
|
||||
train_image = next_task['args']['trainImage']
|
||||
|
||||
print("\n[INFO] You Receive a new task:")
|
||||
print(f" - Download Image: {data_image}")
|
||||
print(f" - Training Image: {train_image}")
|
||||
|
||||
# Start Downloading
|
||||
|
||||
|
||||
else:
|
||||
print("[ERROR] Connected Failed.")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user