nvflare.app_opt.lightning.loggers.client_logger module

MLflow Logger

class ClientLogger(prefix: str = '')[source]

Bases: Logger

LOGGER_JOIN_CHAR = '-'
after_save_checkpoint(checkpoint_callback: ModelCheckpoint) None[source]

Called after model checkpoint callback saves a new checkpoint.

Parameters:

checkpoint_callback – the model checkpoint callback instance

finalize(status: str = 'success') None[source]

Do any processing that is necessary to finalize an experiment.

Parameters:

status – Status that the experiment finished with (e.g. success, failed, aborted)

log_hyperparams(params: dict[str, Any] | Namespace) None[source]

Record hyperparameters.

Parameters:
  • paramsNamespace or Dict containing the hyperparameters

  • args – Optional positional arguments, depends on the specific logger being used

  • kwargs – Optional keyword arguments, depends on the specific logger being used

log_metrics(metrics: Mapping[str, float], step: int | None = None) None[source]

Records metrics. This method logs metrics as soon as it received them.

Parameters:
  • metrics – Dictionary with metric names as keys and measured quantities as values

  • step – Step number at which the metrics should be recorded

property name: str | None

Get the experiment id.

Returns:

The experiment id.

property save_dir: str | None

Return the root directory where experiment logs get saved, or None if the logger does not save data locally.

property version: str | None

Return the experiment version.