Compare commits
No commits in common. "master" and "scatter_image" have entirely different histories.
master
...
scatter_im
File diff suppressed because one or more lines are too long
@ -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()
|
||||
|
||||
@ -114,23 +115,19 @@ class NodeManager():
|
||||
train_image = next_task['args']['trainImage']
|
||||
|
||||
print("\n[INFO] You Receive a new task:")
|
||||
print(f" - Task Index: {task_index}")
|
||||
print(f" - Download Image: {data_image}")
|
||||
print(f" - Training Image: {train_image}")
|
||||
'''
|
||||
|
||||
# data_image = "snsd0805/cifar100-dataset:v1"
|
||||
# train_image = "snsd0805/cifar100-train:v3"
|
||||
data_image = "snsd0805/cifar100-dataset:v1"
|
||||
train_image = "snsd0805/cifar100-train:v3"
|
||||
|
||||
# Start Downloading
|
||||
self.cluster_communication_module.scatter_container(data_image, train=False)
|
||||
# self.cluster_communication_module.scatter_container(data_image, train=False)
|
||||
|
||||
# start training
|
||||
self.cluster_communication_module.scatter_container(train_image, train=True)
|
||||
|
||||
print("Update the task's status...")
|
||||
self.scheduler.update_status(self.wallet, task_index, 4)
|
||||
print("Finished.")
|
||||
|
||||
|
||||
else:
|
||||
print("[ERROR] Connected Failed.")
|
||||
|
||||
@ -55,9 +55,4 @@ class Scheduler():
|
||||
if event['args']['provider'] == address:
|
||||
return event
|
||||
|
||||
def update_status(self, account, task_index, new_status):
|
||||
function = self.contract.functions.updateStatus(task_index, new_status)
|
||||
return self.signed_and_send_transaction(account, function)
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user