Skip to content

Queue

CustomMetricServerRecord

Source code in python/scouter/queue/_queue.pyi
class CustomMetricServerRecord:
    def __init__(
        self,
        space: str,
        name: str,
        version: str,
        metric: str,
        value: float,
    ):
        """Initialize spc drift server record

        Args:
            space:
                Model space
            name:
                Model name
            version:
                Model version
            metric:
                Metric name
            value:
                Metric value
        """

    @property
    def created_at(self) -> datetime.datetime:
        """Return the created at timestamp."""

    @property
    def space(self) -> str:
        """Return the space."""

    @property
    def name(self) -> str:
        """Return the name."""

    @property
    def version(self) -> str:
        """Return the version."""

    @property
    def metric(self) -> str:
        """Return the metric name."""

    @property
    def value(self) -> float:
        """Return the metric value."""

    def __str__(self) -> str:
        """Return the string representation of the record."""

    def model_dump_json(self) -> str:
        """Return the json representation of the record."""

    def to_dict(self) -> Dict[str, str]:
        """Return the dictionary representation of the record."""

created_at property

Return the created at timestamp.

metric property

Return the metric name.

name property

Return the name.

space property

Return the space.

value property

Return the metric value.

version property

Return the version.

__init__(space, name, version, metric, value)

Initialize spc drift server record

Parameters:

Name Type Description Default
space str

Model space

required
name str

Model name

required
version str

Model version

required
metric str

Metric name

required
value float

Metric value

required
Source code in python/scouter/queue/_queue.pyi
def __init__(
    self,
    space: str,
    name: str,
    version: str,
    metric: str,
    value: float,
):
    """Initialize spc drift server record

    Args:
        space:
            Model space
        name:
            Model name
        version:
            Model version
        metric:
            Metric name
        value:
            Metric value
    """

__str__()

Return the string representation of the record.

Source code in python/scouter/queue/_queue.pyi
def __str__(self) -> str:
    """Return the string representation of the record."""

model_dump_json()

Return the json representation of the record.

Source code in python/scouter/queue/_queue.pyi
def model_dump_json(self) -> str:
    """Return the json representation of the record."""

to_dict()

Return the dictionary representation of the record.

Source code in python/scouter/queue/_queue.pyi
def to_dict(self) -> Dict[str, str]:
    """Return the dictionary representation of the record."""

Feature

Source code in python/scouter/queue/_queue.pyi
class Feature:
    @staticmethod
    def int(name: str, value: int) -> "Feature":
        """Create an integer feature

        Args:
            name:
                Name of the feature
            value:
                Value of the feature
        """

    @staticmethod
    def float(name: str, value: float) -> "Feature":
        """Create a float feature

        Args:
            name:
                Name of the feature
            value:
                Value of the feature
        """

    @staticmethod
    def string(name: str, value: str) -> "Feature":
        """Create a string feature

        Args:
            name:
                Name of the feature
            value:
                Value of the feature
        """

    @staticmethod
    def categorical(name: str, value: str) -> "Feature":
        """Create a categorical feature

        Args:
            name:
                Name of the feature
            value:
                Value of the feature
        """

categorical(name, value) staticmethod

Create a categorical feature

Parameters:

Name Type Description Default
name str

Name of the feature

required
value str

Value of the feature

required
Source code in python/scouter/queue/_queue.pyi
@staticmethod
def categorical(name: str, value: str) -> "Feature":
    """Create a categorical feature

    Args:
        name:
            Name of the feature
        value:
            Value of the feature
    """

float(name, value) staticmethod

Create a float feature

Parameters:

Name Type Description Default
name str

Name of the feature

required
value float

Value of the feature

required
Source code in python/scouter/queue/_queue.pyi
@staticmethod
def float(name: str, value: float) -> "Feature":
    """Create a float feature

    Args:
        name:
            Name of the feature
        value:
            Value of the feature
    """

int(name, value) staticmethod

Create an integer feature

Parameters:

Name Type Description Default
name str

Name of the feature

required
value int

Value of the feature

required
Source code in python/scouter/queue/_queue.pyi
@staticmethod
def int(name: str, value: int) -> "Feature":
    """Create an integer feature

    Args:
        name:
            Name of the feature
        value:
            Value of the feature
    """

string(name, value) staticmethod

Create a string feature

Parameters:

Name Type Description Default
name str

Name of the feature

required
value str

Value of the feature

required
Source code in python/scouter/queue/_queue.pyi
@staticmethod
def string(name: str, value: str) -> "Feature":
    """Create a string feature

    Args:
        name:
            Name of the feature
        value:
            Value of the feature
    """

Features

Source code in python/scouter/queue/_queue.pyi
class Features:
    def __init__(self, features: List[Feature]) -> None:
        """Initialize features

        Args:
            features:
                List of features
        """

    def __str__(self) -> str:
        """Return the string representation of the features"""

    @property
    def features(self) -> List[Feature]:
        """Return the list of features"""

    @property
    def entity_type(self) -> EntityType:
        """Return the entity type"""

entity_type property

Return the entity type

features property

Return the list of features

__init__(features)

Initialize features

Parameters:

Name Type Description Default
features List[Feature]

List of features

required
Source code in python/scouter/queue/_queue.pyi
def __init__(self, features: List[Feature]) -> None:
    """Initialize features

    Args:
        features:
            List of features
    """

__str__()

Return the string representation of the features

Source code in python/scouter/queue/_queue.pyi
def __str__(self) -> str:
    """Return the string representation of the features"""

KafkaConfig

Source code in python/scouter/queue/_queue.pyi
class KafkaConfig:
    brokers: str
    topic: str
    compression_type: str
    message_timeout_ms: int
    message_max_bytes: int
    log_level: LogLevel
    config: Dict[str, str]
    max_retries: int
    transport_type: TransportType

    def __init__(
        self,
        brokers: Optional[str] = None,
        topic: Optional[str] = None,
        compression_type: Optional[str] = None,
        message_timeout_ms: int = 600_000,
        message_max_bytes: int = 2097164,
        log_level: LogLevel = LogLevel.Info,
        config: Dict[str, str] = {},
        max_retries: int = 3,
    ) -> None:
        """Kafka configuration to use with the KafkaProducer.

        Args:
            brokers:
                Comma-separated list of Kafka brokers.
                If not provided, the value of the KAFKA_BROKERS environment variable is used.

            topic:
                Kafka topic to publish messages to.
                If not provided, the value of the KAFKA_TOPIC environment variable is used.

            compression_type:
                Compression type to use for messages.
                Default is "gzip".

            message_timeout_ms:
                Message timeout in milliseconds.
                Default is 600_000.

            message_max_bytes:
                Maximum message size in bytes.
                Default is 2097164.

            log_level:
                Log level for the Kafka producer.
                Default is LogLevel.Info.

            config:
                Additional Kafka configuration options. These will be passed to the Kafka producer.
                See https://kafka.apache.org/documentation/#configuration.

            max_retries:
                Maximum number of retries to attempt when publishing messages.
                Default is 3.

        """

__init__(brokers=None, topic=None, compression_type=None, message_timeout_ms=600000, message_max_bytes=2097164, log_level=LogLevel.Info, config={}, max_retries=3)

Kafka configuration to use with the KafkaProducer.

Parameters:

Name Type Description Default
brokers Optional[str]

Comma-separated list of Kafka brokers. If not provided, the value of the KAFKA_BROKERS environment variable is used.

None
topic Optional[str]

Kafka topic to publish messages to. If not provided, the value of the KAFKA_TOPIC environment variable is used.

None
compression_type Optional[str]

Compression type to use for messages. Default is "gzip".

None
message_timeout_ms int

Message timeout in milliseconds. Default is 600_000.

600000
message_max_bytes int

Maximum message size in bytes. Default is 2097164.

2097164
log_level LogLevel

Log level for the Kafka producer. Default is LogLevel.Info.

Info
config Dict[str, str]

Additional Kafka configuration options. These will be passed to the Kafka producer. See https://kafka.apache.org/documentation/#configuration.

{}
max_retries int

Maximum number of retries to attempt when publishing messages. Default is 3.

3
Source code in python/scouter/queue/_queue.pyi
def __init__(
    self,
    brokers: Optional[str] = None,
    topic: Optional[str] = None,
    compression_type: Optional[str] = None,
    message_timeout_ms: int = 600_000,
    message_max_bytes: int = 2097164,
    log_level: LogLevel = LogLevel.Info,
    config: Dict[str, str] = {},
    max_retries: int = 3,
) -> None:
    """Kafka configuration to use with the KafkaProducer.

    Args:
        brokers:
            Comma-separated list of Kafka brokers.
            If not provided, the value of the KAFKA_BROKERS environment variable is used.

        topic:
            Kafka topic to publish messages to.
            If not provided, the value of the KAFKA_TOPIC environment variable is used.

        compression_type:
            Compression type to use for messages.
            Default is "gzip".

        message_timeout_ms:
            Message timeout in milliseconds.
            Default is 600_000.

        message_max_bytes:
            Maximum message size in bytes.
            Default is 2097164.

        log_level:
            Log level for the Kafka producer.
            Default is LogLevel.Info.

        config:
            Additional Kafka configuration options. These will be passed to the Kafka producer.
            See https://kafka.apache.org/documentation/#configuration.

        max_retries:
            Maximum number of retries to attempt when publishing messages.
            Default is 3.

    """

Metric

Source code in python/scouter/queue/_queue.pyi
class Metric:
    def __init__(self, name: str, value: float) -> None:
        """Initialize metric

        Args:
            name:
                Name of the metric
            value:
                Value to assign to the metric
        """

    def __str__(self) -> str:
        """Return the string representation of the metric"""

    @property
    def metrics(self) -> List[Metric]:
        """Return the list of metrics"""

    @property
    def entity_type(self) -> EntityType:
        """Return the entity type"""

entity_type property

Return the entity type

metrics property

Return the list of metrics

__init__(name, value)

Initialize metric

Parameters:

Name Type Description Default
name str

Name of the metric

required
value float

Value to assign to the metric

required
Source code in python/scouter/queue/_queue.pyi
def __init__(self, name: str, value: float) -> None:
    """Initialize metric

    Args:
        name:
            Name of the metric
        value:
            Value to assign to the metric
    """

__str__()

Return the string representation of the metric

Source code in python/scouter/queue/_queue.pyi
def __str__(self) -> str:
    """Return the string representation of the metric"""

Metrics

Source code in python/scouter/queue/_queue.pyi
class Metrics:
    def __init__(self, metrics: List[Metric]) -> None:
        """Initialize metrics

        Args:
            metrics:
                List of metrics
        """

    def __str__(self) -> str:
        """Return the string representation of the metrics"""

__init__(metrics)

Initialize metrics

Parameters:

Name Type Description Default
metrics List[Metric]

List of metrics

required
Source code in python/scouter/queue/_queue.pyi
def __init__(self, metrics: List[Metric]) -> None:
    """Initialize metrics

    Args:
        metrics:
            List of metrics
    """

__str__()

Return the string representation of the metrics

Source code in python/scouter/queue/_queue.pyi
def __str__(self) -> str:
    """Return the string representation of the metrics"""

PsiServerRecord

Source code in python/scouter/queue/_queue.pyi
class PsiServerRecord:
    def __init__(
        self,
        space: str,
        name: str,
        version: str,
        feature: str,
        bin_id: int,
        bin_count: int,
    ):
        """Initialize spc drift server record

        Args:
            space:
                Model space
            name:
                Model name
            version:
                Model version
            feature:
                Feature name
            bin_id:
                Bundle ID
            bin_count:
                Bundle ID
        """

    @property
    def created_at(self) -> datetime.datetime:
        """Return the created at timestamp."""

    @property
    def space(self) -> str:
        """Return the space."""

    @property
    def name(self) -> str:
        """Return the name."""

    @property
    def version(self) -> str:
        """Return the version."""

    @property
    def feature(self) -> str:
        """Return the feature."""

    @property
    def bin_id(self) -> int:
        """Return the bin id."""

    @property
    def bin_count(self) -> int:
        """Return the sample value."""

    def __str__(self) -> str:
        """Return the string representation of the record."""

    def model_dump_json(self) -> str:
        """Return the json representation of the record."""

    def to_dict(self) -> Dict[str, str]:
        """Return the dictionary representation of the record."""

bin_count property

Return the sample value.

bin_id property

Return the bin id.

created_at property

Return the created at timestamp.

feature property

Return the feature.

name property

Return the name.

space property

Return the space.

version property

Return the version.

__init__(space, name, version, feature, bin_id, bin_count)

Initialize spc drift server record

Parameters:

Name Type Description Default
space str

Model space

required
name str

Model name

required
version str

Model version

required
feature str

Feature name

required
bin_id int

Bundle ID

required
bin_count int

Bundle ID

required
Source code in python/scouter/queue/_queue.pyi
def __init__(
    self,
    space: str,
    name: str,
    version: str,
    feature: str,
    bin_id: int,
    bin_count: int,
):
    """Initialize spc drift server record

    Args:
        space:
            Model space
        name:
            Model name
        version:
            Model version
        feature:
            Feature name
        bin_id:
            Bundle ID
        bin_count:
            Bundle ID
    """

__str__()

Return the string representation of the record.

Source code in python/scouter/queue/_queue.pyi
def __str__(self) -> str:
    """Return the string representation of the record."""

model_dump_json()

Return the json representation of the record.

Source code in python/scouter/queue/_queue.pyi
def model_dump_json(self) -> str:
    """Return the json representation of the record."""

to_dict()

Return the dictionary representation of the record.

Source code in python/scouter/queue/_queue.pyi
def to_dict(self) -> Dict[str, str]:
    """Return the dictionary representation of the record."""

Queue

Individual queue associated with a drift profile

Source code in python/scouter/queue/_queue.pyi
class Queue:
    """Individual queue associated with a drift profile"""

    def insert(self, entity: Union[Features, Metrics]) -> None:
        """Insert a record into the queue

        Args:
            entity:
                Entity to insert into the queue.
                Can be an instance for Features or Metrics

        Example:
            ```python
            features = Features(
                features=[
                    Feature.int("feature_1", 1),
                    Feature.float("feature_2", 2.0),
                    Feature.string("feature_3", "value"),
                ]
            )
            queue.insert(Features(features))
            ```
        """

insert(entity)

Insert a record into the queue

Parameters:

Name Type Description Default
entity Union[Features, Metrics]

Entity to insert into the queue. Can be an instance for Features or Metrics

required
Example
features = Features(
    features=[
        Feature.int("feature_1", 1),
        Feature.float("feature_2", 2.0),
        Feature.string("feature_3", "value"),
    ]
)
queue.insert(Features(features))
Source code in python/scouter/queue/_queue.pyi
def insert(self, entity: Union[Features, Metrics]) -> None:
    """Insert a record into the queue

    Args:
        entity:
            Entity to insert into the queue.
            Can be an instance for Features or Metrics

    Example:
        ```python
        features = Features(
            features=[
                Feature.int("feature_1", 1),
                Feature.float("feature_2", 2.0),
                Feature.string("feature_3", "value"),
            ]
        )
        queue.insert(Features(features))
        ```
    """

RabbitMQConfig

Source code in python/scouter/queue/_queue.pyi
class RabbitMQConfig:
    address: str
    queue: str
    max_retries: int
    transport_type: TransportType

    def __init__(
        self,
        host: Optional[str] = None,
        port: Optional[int] = None,
        username: Optional[str] = None,
        password: Optional[str] = None,
        queue: Optional[str] = None,
        max_retries: int = 3,
    ) -> None:
        """RabbitMQ configuration to use with the RabbitMQProducer.

        Args:
            host:
                RabbitMQ host.
                If not provided, the value of the RABBITMQ_HOST environment variable is used.

            port:
                RabbitMQ port.
                If not provided, the value of the RABBITMQ_PORT environment variable is used.

            username:
                RabbitMQ username.
                If not provided, the value of the RABBITMQ_USERNAME environment variable is used.

            password:
                RabbitMQ password.
                If not provided, the value of the RABBITMQ_PASSWORD environment variable is used.

            queue:
                RabbitMQ queue to publish messages to.
                If not provided, the value of the RABBITMQ_QUEUE environment variable is used.

            max_retries:
                Maximum number of retries to attempt when publishing messages.
                Default is 3.
        """

__init__(host=None, port=None, username=None, password=None, queue=None, max_retries=3)

RabbitMQ configuration to use with the RabbitMQProducer.

Parameters:

Name Type Description Default
host Optional[str]

RabbitMQ host. If not provided, the value of the RABBITMQ_HOST environment variable is used.

None
port Optional[int]

RabbitMQ port. If not provided, the value of the RABBITMQ_PORT environment variable is used.

None
username Optional[str]

RabbitMQ username. If not provided, the value of the RABBITMQ_USERNAME environment variable is used.

None
password Optional[str]

RabbitMQ password. If not provided, the value of the RABBITMQ_PASSWORD environment variable is used.

None
queue Optional[str]

RabbitMQ queue to publish messages to. If not provided, the value of the RABBITMQ_QUEUE environment variable is used.

None
max_retries int

Maximum number of retries to attempt when publishing messages. Default is 3.

3
Source code in python/scouter/queue/_queue.pyi
def __init__(
    self,
    host: Optional[str] = None,
    port: Optional[int] = None,
    username: Optional[str] = None,
    password: Optional[str] = None,
    queue: Optional[str] = None,
    max_retries: int = 3,
) -> None:
    """RabbitMQ configuration to use with the RabbitMQProducer.

    Args:
        host:
            RabbitMQ host.
            If not provided, the value of the RABBITMQ_HOST environment variable is used.

        port:
            RabbitMQ port.
            If not provided, the value of the RABBITMQ_PORT environment variable is used.

        username:
            RabbitMQ username.
            If not provided, the value of the RABBITMQ_USERNAME environment variable is used.

        password:
            RabbitMQ password.
            If not provided, the value of the RABBITMQ_PASSWORD environment variable is used.

        queue:
            RabbitMQ queue to publish messages to.
            If not provided, the value of the RABBITMQ_QUEUE environment variable is used.

        max_retries:
            Maximum number of retries to attempt when publishing messages.
            Default is 3.
    """

RedisConfig

Source code in python/scouter/queue/_queue.pyi
class RedisConfig:
    address: str
    channel: str
    transport_type: TransportType

    def __init__(
        self,
        address: Optional[str] = None,
        chanel: Optional[str] = None,
    ) -> None:
        """Redis configuration to use with a Redis producer

        Args:
            address (str):
                Redis address.
                If not provided, the value of the REDIS_ADDR environment variable is used and defaults to "redis://localhost:6379".

            channel (str):
                Redis channel to publish messages to.
                If not provided, the value of the REDIS_CHANNEL environment variable is used and defaults to "scouter_monitoring".
        """

__init__(address=None, chanel=None)

Redis configuration to use with a Redis producer

Parameters:

Name Type Description Default
address str

Redis address. If not provided, the value of the REDIS_ADDR environment variable is used and defaults to "redis://localhost:6379".

None
channel str

Redis channel to publish messages to. If not provided, the value of the REDIS_CHANNEL environment variable is used and defaults to "scouter_monitoring".

required
Source code in python/scouter/queue/_queue.pyi
def __init__(
    self,
    address: Optional[str] = None,
    chanel: Optional[str] = None,
) -> None:
    """Redis configuration to use with a Redis producer

    Args:
        address (str):
            Redis address.
            If not provided, the value of the REDIS_ADDR environment variable is used and defaults to "redis://localhost:6379".

        channel (str):
            Redis channel to publish messages to.
            If not provided, the value of the REDIS_CHANNEL environment variable is used and defaults to "scouter_monitoring".
    """

ScouterQueue

Main queue class for Scouter. Publishes drift records to the configured transport

Source code in python/scouter/queue/_queue.pyi
class ScouterQueue:
    """Main queue class for Scouter. Publishes drift records to the configured transport"""

    @staticmethod
    def from_path(
        path: Dict[str, Path],
        transport_config: Union[
            KafkaConfig,
            RabbitMQConfig,
            RedisConfig,
            HTTPConfig,
        ],
    ) -> ScouterQueue:
        """Initializes Scouter queue from one or more drift profile paths

        Args:
            path (Dict[str, Path]):
                Dictionary of drift profile paths.
                Each key is a user-defined alias for accessing a queue
            transport_config (Union[KafkaConfig, RabbitMQConfig, RedisConfig, HTTPConfig]):
                Transport configuration for the queue publisher
                Can be KafkaConfig, RabbitMQConfig RedisConfig, or HTTPConfig

        Example:
            ```python
            queue = ScouterQueue(
                path={
                    "spc": Path("spc_profile.json"),
                    "psi": Path("psi_profile.json"),
                },
                transport_config=KafkaConfig(
                    brokers="localhost:9092",
                    topic="scouter_topic",
                ),
            )

            queue["psi"].insert(
                Features(
                    features=[
                        Feature.int("feature_1", 1),
                        Feature.float("feature_2", 2.0),
                        Feature.string("feature_3", "value"),
                    ]
                )
            )
            ```
        """

    def __getitem__(self, key: str) -> Queue:
        """Get the queue for the specified key

        Args:
            key (str):
                Key to get the queue for

        """

    def shutdown(self) -> None:
        """Shutdown the queue. This will close and flush all queues and transports"""

__getitem__(key)

Get the queue for the specified key

Parameters:

Name Type Description Default
key str

Key to get the queue for

required
Source code in python/scouter/queue/_queue.pyi
def __getitem__(self, key: str) -> Queue:
    """Get the queue for the specified key

    Args:
        key (str):
            Key to get the queue for

    """

from_path(path, transport_config) staticmethod

Initializes Scouter queue from one or more drift profile paths

Parameters:

Name Type Description Default
path Dict[str, Path]

Dictionary of drift profile paths. Each key is a user-defined alias for accessing a queue

required
transport_config Union[KafkaConfig, RabbitMQConfig, RedisConfig, HTTPConfig]

Transport configuration for the queue publisher Can be KafkaConfig, RabbitMQConfig RedisConfig, or HTTPConfig

required
Example
queue = ScouterQueue(
    path={
        "spc": Path("spc_profile.json"),
        "psi": Path("psi_profile.json"),
    },
    transport_config=KafkaConfig(
        brokers="localhost:9092",
        topic="scouter_topic",
    ),
)

queue["psi"].insert(
    Features(
        features=[
            Feature.int("feature_1", 1),
            Feature.float("feature_2", 2.0),
            Feature.string("feature_3", "value"),
        ]
    )
)
Source code in python/scouter/queue/_queue.pyi
@staticmethod
def from_path(
    path: Dict[str, Path],
    transport_config: Union[
        KafkaConfig,
        RabbitMQConfig,
        RedisConfig,
        HTTPConfig,
    ],
) -> ScouterQueue:
    """Initializes Scouter queue from one or more drift profile paths

    Args:
        path (Dict[str, Path]):
            Dictionary of drift profile paths.
            Each key is a user-defined alias for accessing a queue
        transport_config (Union[KafkaConfig, RabbitMQConfig, RedisConfig, HTTPConfig]):
            Transport configuration for the queue publisher
            Can be KafkaConfig, RabbitMQConfig RedisConfig, or HTTPConfig

    Example:
        ```python
        queue = ScouterQueue(
            path={
                "spc": Path("spc_profile.json"),
                "psi": Path("psi_profile.json"),
            },
            transport_config=KafkaConfig(
                brokers="localhost:9092",
                topic="scouter_topic",
            ),
        )

        queue["psi"].insert(
            Features(
                features=[
                    Feature.int("feature_1", 1),
                    Feature.float("feature_2", 2.0),
                    Feature.string("feature_3", "value"),
                ]
            )
        )
        ```
    """

shutdown()

Shutdown the queue. This will close and flush all queues and transports

Source code in python/scouter/queue/_queue.pyi
def shutdown(self) -> None:
    """Shutdown the queue. This will close and flush all queues and transports"""

ServerRecord

Source code in python/scouter/queue/_queue.pyi
class ServerRecord:
    Spc: "ServerRecord"
    Psi: "ServerRecord"
    Custom: "ServerRecord"
    Observability: "ServerRecord"

    def __init__(self, record: Any) -> None:
        """Initialize server record

        Args:
            record:
                Server record to initialize
        """

    @property
    def record(
        self,
    ) -> Union[SpcServerRecord, PsiServerRecord, CustomMetricServerRecord, ObservabilityMetrics]:
        """Return the drift server record."""

record property

Return the drift server record.

__init__(record)

Initialize server record

Parameters:

Name Type Description Default
record Any

Server record to initialize

required
Source code in python/scouter/queue/_queue.pyi
def __init__(self, record: Any) -> None:
    """Initialize server record

    Args:
        record:
            Server record to initialize
    """

ServerRecords

Source code in python/scouter/queue/_queue.pyi
class ServerRecords:
    def __init__(self, records: List[ServerRecord]) -> None:
        """Initialize server records

        Args:
            records:
                List of server records
        """

    @property
    def records(self) -> List[ServerRecord]:
        """Return the drift server records."""

    def model_dump_json(self) -> str:
        """Return the json representation of the record."""

    def __str__(self) -> str:
        """Return the string representation of the record."""

records property

Return the drift server records.

__init__(records)

Initialize server records

Parameters:

Name Type Description Default
records List[ServerRecord]

List of server records

required
Source code in python/scouter/queue/_queue.pyi
def __init__(self, records: List[ServerRecord]) -> None:
    """Initialize server records

    Args:
        records:
            List of server records
    """

__str__()

Return the string representation of the record.

Source code in python/scouter/queue/_queue.pyi
def __str__(self) -> str:
    """Return the string representation of the record."""

model_dump_json()

Return the json representation of the record.

Source code in python/scouter/queue/_queue.pyi
def model_dump_json(self) -> str:
    """Return the json representation of the record."""

SpcServerRecord

Source code in python/scouter/queue/_queue.pyi
class SpcServerRecord:
    def __init__(
        self,
        space: str,
        name: str,
        version: str,
        feature: str,
        value: float,
    ):
        """Initialize spc drift server record

        Args:
            space:
                Model space
            name:
                Model name
            version:
                Model version
            feature:
                Feature name
            value:
                Feature value
        """

    @property
    def created_at(self) -> datetime.datetime:
        """Return the created at timestamp."""

    @property
    def space(self) -> str:
        """Return the space."""

    @property
    def name(self) -> str:
        """Return the name."""

    @property
    def version(self) -> str:
        """Return the version."""

    @property
    def feature(self) -> str:
        """Return the feature."""

    @property
    def value(self) -> float:
        """Return the sample value."""

    def __str__(self) -> str:
        """Return the string representation of the record."""

    def model_dump_json(self) -> str:
        """Return the json representation of the record."""

    def to_dict(self) -> Dict[str, str]:
        """Return the dictionary representation of the record."""

created_at property

Return the created at timestamp.

feature property

Return the feature.

name property

Return the name.

space property

Return the space.

value property

Return the sample value.

version property

Return the version.

__init__(space, name, version, feature, value)

Initialize spc drift server record

Parameters:

Name Type Description Default
space str

Model space

required
name str

Model name

required
version str

Model version

required
feature str

Feature name

required
value float

Feature value

required
Source code in python/scouter/queue/_queue.pyi
def __init__(
    self,
    space: str,
    name: str,
    version: str,
    feature: str,
    value: float,
):
    """Initialize spc drift server record

    Args:
        space:
            Model space
        name:
            Model name
        version:
            Model version
        feature:
            Feature name
        value:
            Feature value
    """

__str__()

Return the string representation of the record.

Source code in python/scouter/queue/_queue.pyi
def __str__(self) -> str:
    """Return the string representation of the record."""

model_dump_json()

Return the json representation of the record.

Source code in python/scouter/queue/_queue.pyi
def model_dump_json(self) -> str:
    """Return the json representation of the record."""

to_dict()

Return the dictionary representation of the record.

Source code in python/scouter/queue/_queue.pyi
def to_dict(self) -> Dict[str, str]:
    """Return the dictionary representation of the record."""