Skip to content

Commit

Permalink
Added id to the swarm_script_executor_cifar10 component deploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
yhwen committed Jun 28, 2024
1 parent 35cfd33 commit 4a5d6cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/getting_started/pt/swarm_script_executor_cifar10.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@

# In swarm learning, each client acts also as an aggregator
aggregator = InTimeAccumulateWeightedAggregator(expected_data_kind=DataKind.WEIGHTS)
job.to(aggregator, f"site-{i}")
job.to(aggregator, f"site-{i}", id="aggregator")

# In swarm learning, each client uses a model persistor and shareable_generator
job.to(PTFileModelPersistor(model=Net()), f"site-{i}")
job.to(SimpleModelShareableGenerator(), f"site-{i}")
job.to(PTFileModelPersistor(model=Net()), f"site-{i}", id='persistor')
job.to(SimpleModelShareableGenerator(), f"site-{i}", id='shareable_generator')

# job.export_job("/tmp/nvflare/jobs/job_config")
job.simulator_run("/tmp/nvflare/jobs/workdir")

0 comments on commit 4a5d6cf

Please sign in to comment.