MCPcopy
hub / github.com/FedML-AI/FedML / init

Function init

python/fedml/fa/__init__.py:8–31  ·  view source on GitHub ↗
(args=None)

Source from the content-addressed store, hash-verified

6
7
8def init(args=None):
9 print(f"args={args}")
10 if args is None:
11 args = load_arguments(training_type=None, comm_backend=None)
12
13 """Initialize FedML Engine."""
14 collect_env(args)
15 fedml._global_training_type = args.training_type
16 fedml._global_comm_backend = args.backend
17
18 if args.training_type == FEDML_TRAINING_PLATFORM_SIMULATION and hasattr(args, "backend") and args.backend == "sp":
19 args = init_simulation_sp(args)
20 elif args.training_type == FEDML_TRAINING_PLATFORM_CROSS_SILO:
21 args = init_cross_silo(args)
22 else:
23 raise Exception("no such setting: training_type = {}, backend = {}".format(args.training_type, args.backend))
24
25 fedml._update_client_id_list(args)
26 mlops.init(args)
27 logging.info("args.rank = {}, args.worker_num = {}".format(args.rank, args.worker_num))
28 fedml._update_client_specific_args(args)
29 fedml._print_args(args)
30
31 return args
32
33def manage_mpi_args(args):
34 if hasattr(args, "backend") and args.backend == "MPI":

Callers 14

client.pyFile · 0.90
server.pyFile · 0.90
client.pyFile · 0.90
server.pyFile · 0.90
client.pyFile · 0.90
server.pyFile · 0.90
client.pyFile · 0.90
server.pyFile · 0.90
client.pyFile · 0.90
server.pyFile · 0.90
client.pyFile · 0.90
server.pyFile · 0.90

Calls 6

collect_envFunction · 0.85
init_simulation_spFunction · 0.85
init_cross_siloFunction · 0.85
initMethod · 0.65
load_argumentsFunction · 0.50
infoMethod · 0.45

Tested by

no test coverage detected