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

Function set_realtime_params

python/fedml/core/mlops/__init__.py:1114–1143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1112
1113
1114def set_realtime_params():
1115 should_parse_args = False
1116 if mlops_parrot_enabled(MLOpsStore.mlops_args):
1117 return
1118 else:
1119 MLOpsStore.mlops_bind_result = True
1120 should_parse_args = True
1121
1122 if should_parse_args:
1123 if MLOpsStore.mlops_args is not None:
1124 MLOpsStore.mlops_run_id = MLOpsStore.mlops_args.run_id
1125 if MLOpsStore.mlops_args.rank == 0:
1126 if hasattr(MLOpsStore.mlops_args, "server_id"):
1127 MLOpsStore.mlops_edge_id = MLOpsStore.mlops_args.server_id
1128 else:
1129 MLOpsStore.mlops_edge_id = 0
1130 else:
1131 if hasattr(MLOpsStore.mlops_args, "client_id"):
1132 MLOpsStore.mlops_edge_id = MLOpsStore.mlops_args.client_id
1133 elif hasattr(MLOpsStore.mlops_args, "client_id_list"):
1134 MLOpsStore.mlops_edge_id = json.loads(MLOpsStore.mlops_args.client_id_list)[0]
1135 else:
1136 MLOpsStore.mlops_edge_id = 0
1137
1138 if hasattr(MLOpsStore.mlops_args, "server_agent_id"):
1139 MLOpsStore.server_agent_id = MLOpsStore.mlops_args.server_agent_id
1140 else:
1141 MLOpsStore.server_agent_id = MLOpsStore.mlops_edge_id
1142
1143 return True
1144
1145
1146def mlops_simulator_login(userid, run_id):

Callers 15

eventFunction · 0.85
logFunction · 0.85
log_training_statusFunction · 0.85
log_aggregation_statusFunction · 0.85
send_exit_train_msgFunction · 0.85

Calls 1

mlops_parrot_enabledFunction · 0.85

Tested by

no test coverage detected