Skip to main content
App version: 3.4.10

log_string_series()

Logs the specified series of text values to a Neptune run.

Pass the metadata as a dictionary {key: value} with:

  • key: path to where the metadata should be stored in the run.
  • value: a string value to append to the series.

In the attribute path, each forward slash / nests the attribute under a namespace. Use namespaces to structure the metadata into meaningful categories.

Parameters

NameTypeDefaultDescription
dataDict[str, str]NoneDictionary of strings to log. Each string value is associated with a step. To log multiple strings at once, pass multiple key-value pairs.
stepUnion[float, int]NoneIndex of the log entry. Must be increasing. Tip: Using float rather than int values can be useful, for example, when logging substeps in a batch.
timestampdatetime, optionalNoneTime of logging the metadata. If not provided, the current time is used. If provided, and timestamp.tzinfo is not set, the time is assumed to be in the local timezone.

Example

from neptune_scale import Run


with Run(...) as run:
run.log_string_series(
data={"messages/errors": "Job failed", "messages/info": "Training completed"},
step=1.2,
)
tip

By default, Neptune logs the standard streams stderr and stdout automatically.

  • The logs are stored under the paths system/stdout and system/stderr by default. To change the namespace from system to something else, pass a different name to the system_namespace argument.
  • To disable the tracking of console logs, set enable_console_log_capture to False.