AzureMLLogger
- class health_ml.utils.AzureMLLogger[source]
Bases:
pytorch_lightning.loggers.base.LightningLoggerBase
A Pytorch Lightning logger that stores metrics in the current AzureML run. If the present run is not inside AzureML, nothing gets logged.
Methods Summary
Return the experiment object associated with this logger.
log_hyperparams
(params)Logs the given model hyperparameters to AzureML as a table.
log_metrics
(metrics[, step])Writes the given metrics dictionary to the AzureML run context.
name
()Return the experiment name.
version
()Return the experiment version.
Methods Documentation
- log_hyperparams(params)[source]
Logs the given model hyperparameters to AzureML as a table. Namespaces are converted to dictionaries. Nested dictionaries are flattened out.
- Return type
None
- log_metrics(metrics, step=None)[source]
Writes the given metrics dictionary to the AzureML run context. If the metrics dictionary has an epoch key, the step value (x-axis for plots) is left empty. If there is no epoch key, the step value is taken from the function argument. This is the case for metrics that are logged with the on_step=True flag.
- Parameters
metrics (
Dict
[str
,float
]) – A dictionary with metrics to log. Keys are strings, values are floating point numbers.step (
Optional
[int
]) – The trainer global step for logging.
- Return type
None