MCPcopy Index your code
hub / github.com/FedML-AI/FedML / run_simulation

Function run_simulation

python/fedml/launch_simulation.py:9–29  ·  view source on GitHub ↗

FedML Parrot

(backend=FEDML_SIMULATION_TYPE_SP)

Source from the content-addressed store, hash-verified

7
8
9def run_simulation(backend=FEDML_SIMULATION_TYPE_SP):
10
11 """FedML Parrot"""
12 fedml._global_training_type = FEDML_TRAINING_PLATFORM_SIMULATION
13 fedml._global_comm_backend = backend
14
15 # init FedML framework
16 args = fedml.init()
17
18 # init device
19 device = fedml.device.get_device(args)
20
21 # load data
22 dataset, output_dim = fedml.data.load(args)
23
24 # load model
25 model = fedml.model.create(args, output_dim)
26
27 # start training
28 fedml_runner = FedMLRunner(args, device, dataset, model)
29 fedml_runner.run()
30

Callers

nothing calls this directly

Calls 5

runMethod · 0.95
FedMLRunnerClass · 0.85
loadMethod · 0.80
createMethod · 0.80
initMethod · 0.65

Tested by

no test coverage detected