Skip to content

chore: Forced step and timestamp to be keyword only #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/neptune_scale/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -419,24 +420,23 @@ 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:
```
from neptune_scale import Run

with Run(...) as run:
run.log_metrics(
{"loss": 0.14, "acc": 0.78},
step=1.2,
data={"loss": 0.14, "acc": 0.78},
)
```
"""
Expand Down
Loading