Closed fermat97 closed 4 years ago
Did you initiate each node/grid?
This is the code snippet I used:
import syft as sy
from syft.workers.node_client import NodeClient
from syft.grid.public_grid import PublicGridNetwork
import torch
hook = sy.TorchHook(torch)
nodes = ["ws://localhost:3000/","ws://localhost:3001/"]
compute_nodes = []
for node in nodes:
compute_nodes.append( NodeClient(hook, node) )
But if you just did it without support of docker/command line, that's not supposed to work. You have to initiate the gateway and both node using docker from grid documentation or using the following commands:
Gateway (at grid/gateway):
python gateway.py --port=5000 --start_local_db
Each node (at grid/app/websocket):
python websocket_app.py --id=bob --port=3001 --gateway_url=http://localhost:5000
python websocket_app.py --id=alice --port=3001 --gateway_url=http://localhost:5000
thank you so much. It works when I run them as you said, in the background.
Hi, I am using PyTorch 1.4.0, and syft version 0.2.3.a1. I am trying to run grid tutorial on federated learning. Once I do
compute_nodes.append( NodeClient(hook, node) )
, I get the following error:This is the full stack of the error: