Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add correct params exchange format for tf #2676

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/getting_started/tf/nvflare_tf_getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,12 @@
"metadata": {},
"outputs": [],
"source": [
"from nvflare.client.config import ExchangeFormat\n",
"\n",
"for i in range(n_clients):\n",
" executor = ScriptExecutor(\n",
" task_script_path=\"src/cifar10_tf_fl.py\", task_script_args=\"\" # f\"--batch_size 32 --data_path /tmp/data/site-{i}\"\n",
" params_exchange_format=ExchangeFormat.NUMPY,\n",
" )\n",
" job.to(executor, f\"site-{i}\", gpu=0)"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from src.tf_net import TFNet

from nvflare import FedAvg, FedJob, ScriptExecutor
from nvflare.client.config import ExchangeFormat

if __name__ == "__main__":
n_clients = 2
Expand All @@ -36,7 +37,9 @@
# Add clients
for i in range(n_clients):
executor = ScriptExecutor(
task_script_path=train_script, task_script_args="" # f"--batch_size 32 --data_path /tmp/data/site-{i}"
task_script_path=train_script,
task_script_args="", # f"--batch_size 32 --data_path /tmp/data/site-{i}"
params_exchange_format=ExchangeFormat.NUMPY,
)
job.to(executor, f"site-{i}", gpu=0)

Expand Down
Loading