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

Added id to the jobAPI swarm_script_executor_cifar10 component deploy #2678

Merged
merged 9 commits into from
Aug 2, 2024
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")
yhwen marked this conversation as resolved.
Show resolved Hide resolved
job.to(SimpleModelShareableGenerator(), f"site-{i}", id="shareable_generator")
yhwen marked this conversation as resolved.
Show resolved Hide resolved

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