Skip to content

hsml.deployment_logging_config #

DeploymentLoggingConfig #

Feature logging configuration of a serving deployment.

The default predictor logs every request to the feature view's logging feature group. This object sets, per deployment, how the predictor batches rows before it hands them over, and, on the realtime transport, the resources of the inference logger sidecar that produces them to Kafka. Every field is optional. A field left as None takes the platform default an administrator sets through the serving_feature_logger_* variables; the values themselves are the platform's, so they are not repeated here. Values are read when the deployment's pods start, so set them before deployment.start() or follow a change with deployment.save() and deployment.restart().

Example
from hsml.deployment_logging_config import DeploymentLoggingConfig

deployment = model.deploy(
    feature_logging=DeploymentLoggingConfig(
        flush_interval_seconds=600,
        flush_bytes=4 * 1024 * 1024,
    )
)
deployment.start()

# tighten the loss bound later
deployment.feature_logging.flush_interval_seconds = 60
deployment.save()
deployment.restart()
PARAMETER DESCRIPTION
flush_interval_seconds

Age at which the job transport's file buffer rotates the open segment and uploads it, whether or not it reached flush_bytes.

TYPE: int | None DEFAULT: None

flush_bytes

Size at which the job transport's file buffer rotates the open segment, before the interval elapses.

TYPE: int | None DEFAULT: None

max_buffer_bytes

Upper bound on the bytes the job transport's buffer holds on the pod; rows beyond it are dropped and counted.

TYPE: int | None DEFAULT: None

max_event_bytes

Largest single batch the predictor posts; a larger batch is split into several posts. It must stay within the inference logger's own limit, which the chart sets.

TYPE: int | None DEFAULT: None

shutdown_seconds

Budget the predictor has to drain and upload what it holds when the deployment stops or its revision rolls.

TYPE: int | None DEFAULT: None

batch_rows

Rows the predictor collects before it posts one batch. It must stay within the inference logger's per-post row cap, which the chart sets, or every post over the cap is refused.

TYPE: int | None DEFAULT: None

batch_bytes

Coalesced batch bytes that force a post while the predictor has a logging backlog; an idle predictor posts at once.

TYPE: int | None DEFAULT: None

batch_seconds

Upper bound on the time the predictor spends coalescing one post; it drains what is already queued rather than waiting for more rows to arrive.

TYPE: int | None DEFAULT: None

queue_size

Rows the predictor keeps queued for logging, including rows in flight; beyond it rows are dropped and counted.

TYPE: int | None DEFAULT: None

sidecar_cpu

CPU request of the feature-log sidecar container, in cores.

TYPE: float | None DEFAULT: None

sidecar_memory_mb

Memory request of the feature-log sidecar container, in MiB.

TYPE: int | None DEFAULT: None

transport

How logged rows reach the logging feature group, "realtime" through the inference logger and Kafka with an online copy, or "job" through a file buffer, HopsFS and a Python job. The flush and buffer fields apply to "job" only and are rejected on a "realtime" deployment.

TYPE: str | None DEFAULT: None

batch_bytes property writable #

Coalesced batch bytes that force a post while the predictor has a backlog.

batch_rows property writable #

Rows the predictor collects before posting one batch.

batch_seconds property writable #

Longest time the predictor holds a partial batch before posting it.

flush_bytes property writable #

Buffered bytes that trigger a write before the interval elapses.

flush_interval_seconds property writable #

Longest time the sidecar keeps rows in memory before writing them.

max_buffer_bytes property writable #

Upper bound on the bytes the job transport's buffer holds on the pod.

Rows beyond it are dropped and counted. The sidecar is not what buffers for this transport: the file buffer is the predictor's own, on the pod's disk.

max_event_bytes property writable #

Largest single batch posted to the sidecar.

queue_size property writable #

Rows the predictor keeps queued for logging before it drops new ones.

shutdown_seconds property writable #

Time the sidecar has to write its buffer when the deployment stops.

sidecar_cpu property writable #

CPU request of the feature-log sidecar container, in cores.

sidecar_memory_mb property writable #

Memory request of the feature-log sidecar container, in MiB.

transport property writable #

How logged rows reach the logging feature group, "realtime" or "job".

describe #

describe()

Print a JSON description of the logging configuration.