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 TYPE: |
flush_bytes | Size at which the job transport's file buffer rotates the open segment, before the interval elapses. TYPE: |
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: |
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: |
shutdown_seconds | Budget the predictor has to drain and upload what it holds when the deployment stops or its revision rolls. TYPE: |
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: |
batch_bytes | Coalesced batch bytes that force a post while the predictor has a logging backlog; an idle predictor posts at once. TYPE: |
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: |
queue_size | Rows the predictor keeps queued for logging, including rows in flight; beyond it rows are dropped and counted. TYPE: |
sidecar_cpu | CPU request of the feature-log sidecar container, in cores. TYPE: |
sidecar_memory_mb | Memory request of the feature-log sidecar container, in MiB. TYPE: |
transport | How logged rows reach the logging feature group, TYPE: |
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".