Setup: Install and Authenticate
This guide walks you through setting up all three parties (DO1, DO2, and DS) in their respective Google Colab notebooks.
Step 1: Install the syft-flwr Package
In each notebook (DO1, DO2, and DS), install the syft-flwr package:
!uv pip install -q "git+https://github.com/OpenMined/syft-flwr.git@main"
Step 2: Authenticate Each Party
Data Owner Authentication (DO1 & DO2)
In each Data Owner notebook, run:
import syft_client as sc
import syft_flwr
print(f"{sc.__version__ = }")
print(f"{syft_flwr.__version__ = }")
do_email = input("Enter the Data Owner's email: ")
do_client = sc.login_do(email=do_email)
Google will prompt you for permission to access your credentials:
- Click "Allow" when prompted
- Follow the pop-up windows to complete authentication
Data Scientist Authentication (DS)
In the Data Scientist notebook, run:
import syft_client as sc
import syft_flwr
print(f"{sc.__version__ = }")
print(f"{syft_flwr.__version__ = }")
ds_email = input("Enter the Data Scientist's email: ")
ds_client = sc.login_ds(email=ds_email)
Step 3: Data Scientist Adds Data Owners as Peers
In the Data Scientist notebook, add both data owners as peers:
# Add first data owner
do1_email = input("Enter the First Data Owner's email: ")
ds_client.add_peer(do1_email)
# Add second data owner
do2_email = input("Enter the Second Data Owner's email: ")
ds_client.add_peer(do2_email)
# Verify peers are added
ds_client.peers
You should see both data owners listed as peers.
Verification Checklist
Before proceeding, ensure:
- DO1 is authenticated and
do_clientis created - DO2 is authenticated and
do_clientis created - DS is authenticated and
ds_clientis created - DS has added both DO1 and DO2 as peers
Next Steps
Continue to the Data Owner Workflow to create datasets.