diff --git a/src/neptune_scale/__init__.py b/src/neptune_scale/__init__.py index 2bc91f16..5ab64b1c 100644 --- a/src/neptune_scale/__init__.py +++ b/src/neptune_scale/__init__.py @@ -402,9 +402,10 @@ def _create_run( def log_metrics( self, + data: Dict[str, Union[float, int]], + *, step: Optional[Union[float, int]] = None, timestamp: Optional[datetime] = None, - data: Optional[Dict[str, Union[float, int]]] = None, ) -> None: """ Logs the specified metrics to a Neptune run. @@ -419,15 +420,14 @@ def log_metrics( Use namespaces to structure the metadata into meaningful categories. Args: - step: Index of the log entry. Must be increasing. - If not specified, the log_metrics() call increments the step starting from the highest - already logged value. - Tip: Using float rather than int values can be useful, for example, when logging substeps in a batch. - timestamp: Time of logging the metadata. data: Dictionary of metrics to log. Each metric value is associated with a step. To log multiple metrics at once, pass multiple key-value pairs. - + step (optional): Index of the log entry. Must be increasing. + If not specified, the log_metrics() call increments the step starting from the highest + already logged value. + Tip: Using float rather than int values can be useful, for example, when logging substeps in a batch. + timestamp (optional): Time of logging the metadata. If not specified, the current time is used. Examples: ``` @@ -435,8 +435,8 @@ def log_metrics( with Run(...) as run: run.log_metrics( + {"loss": 0.14, "acc": 0.78}, step=1.2, - data={"loss": 0.14, "acc": 0.78}, ) ``` """