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

Function log

python/fedml/core/mlops/__init__.py:170–184  ·  view source on GitHub ↗
(metrics: dict, step: int = None, customized_step_key: str = None, commit: bool = True)

Source from the content-addressed store, hash-verified

168
169
170def log(metrics: dict, step: int = None, customized_step_key: str = None, commit: bool = True):
171 if MLOpsStore.mlops_args is None or fedml._global_training_type == constants.FEDML_TRAINING_PLATFORM_CROSS_CLOUD:
172 log_metric(metrics, step=step, customized_step_key=customized_step_key, commit=commit)
173 return
174
175 if not mlops_enabled(MLOpsStore.mlops_args):
176 return
177
178 set_realtime_params()
179
180 if not MLOpsStore.mlops_bind_result:
181 return
182
183 log_metric(metrics, step=step, customized_step_key=customized_step_key, commit=commit,
184 run_id=MLOpsStore.mlops_run_id, edge_id=MLOpsStore.mlops_edge_id)
185
186
187def log_llm_record(metrics: dict, version="release", commit: bool = True) -> None:

Callers

nothing calls this directly

Calls 3

mlops_enabledFunction · 0.85
set_realtime_paramsFunction · 0.85
log_metricFunction · 0.70

Tested by

no test coverage detected