Skip to content
Snippets Groups Projects
Commit 3189b6e9 authored by Jeffrey Wigger's avatar Jeffrey Wigger
Browse files

some fixes to WalkRouting

parent 6f89c99c
No related branches found
No related tags found
No related merge requests found
......@@ -561,7 +561,7 @@ class TCPRandomWalkRoutingInternal(TCPRandomWalkBase):
if self.current_data == None: # have not yet received this rounds data
return
if len(self.outgoing_request) != 0:
logging.debug(f"still have outgoing requests {len(self.outgoing_request)}")
logging.debug(f"still have outgoing requests {self.outgoing_request}")
return
if len(self.future_neighbours.get(self.current_round, [])) != 0:
logging.debug(
......@@ -649,7 +649,7 @@ class TCPRandomWalkRoutingInternal(TCPRandomWalkBase):
self.send(
sender, self.current_data
) # messaging is tcp based so this should always arrive after helo
elif round == self.current_round + 1: # they are ahead
elif round > self.current_round: # they are ahead
self.future_neighbours.setdefault(round, []).append((sender, False))
logging.info(f"Added {sender} to future neighbors")
# we conntact them in the next local round
......@@ -812,6 +812,7 @@ class TCPRandomWalkRoutingInternal(TCPRandomWalkBase):
f"Response to our disconnect request for {sender} with round {bye[1]}"
)
else: # this goodbye was not initiated by us
logging.debug(f"sender {sender} not in outgoing byes")
all_to_be_removed = self.this_round_bye.union(
set(self.future_byes.keys())
)
......
......@@ -210,7 +210,7 @@ class CIFAR10(Dataset):
count += 1
_, predictions = torch.max(outputs, 1)
for label, prediction in zip(labels, predictions):
logging.debug("{} predicted as {}".format(label, prediction))
# logging.debug("{} predicted as {}".format(label, prediction))
if label == prediction:
correct_pred[label] += 1
total_correct += 1
......@@ -224,7 +224,7 @@ class CIFAR10(Dataset):
accuracy = 100 * float(value) / total_pred[key]
else:
accuracy = 100.0
logging.debug("Accuracy for class {} is: {:.1f} %".format(key, accuracy))
# logging.debug("Accuracy for class {} is: {:.1f} %".format(key, accuracy))
accuracy = 100 * float(total_correct) / total_predicted
loss_val = loss_val / count
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment