Skip to content

SPC drift profile

The SpcDriftProfile serves as the core component for monitoring model drift in production.

PropertyTypeDescriptionExample
scouter_versionstrThe version of scouter that was used to create your SPC drift profile.spc_profile.scouter_version"1.0.0"
featuresdict[str, SpcFeatureDriftProfile]A mapping of feature names to their respective drift profiles.spc_profile.features['feature_name']*Instance of SpcFeatureDriftProfile*
configSpcDriftConfigThe drift config defined at the time of profile creationg.spc_profile.config*Instance of SpcDriftConfig*

Serializes the SpcDriftProfile instance to a JSON string.

  • Parameters: None
  • Returns: A JSON string representation of the instance.
  • Return Type: str

Return dictionary representation of the drift profile.

  • Parameters: None
  • Returns: dict[str, Any] representation of the instance.
  • Return Type: dict[str, Any]

Save drift profile to json file.

  • Parameters:
    • path (Optional[Path]): Optional path to save the drift profile. If None, outputs to drift_profile.json.
  • Returns: None
  • Return Type: None

Inplace operation that updates config args.

  • Parameters:
    • space (Optional[str]): Name of the model space.
    • name (Optional[str]): Name of the model.
    • version (Optional[str]): Version of the model.
    • targets (Optional[str]): Target(s) of the model / Dependant variable(s).
    • sample (Optional[bool]): Whether to use sampling or not.
    • sample_size (Optional[bool]): Size of the samples you want to use.
    • alert_config (Optional[SpcAlertConfig]): Instance of SpcAlertConfig
  • Returns: None
  • Return Type: None

Validate a JSON string representation of a saved profile.

  • Parameters:
    • json_string (str): SpcDriftProfile in JSON string format.
  • Returns: SpcDriftProfile
  • Return Type: SpcDriftProfile

Load a SpcDriftProfile from file.

  • Parameters:
    • path (Path): Path to the file.
  • Returns: SpcDriftProfile
  • Return Type: SpcDriftProfile

Validate a dict representation of a saved profile.

  • Parameters:
    • data (Dict[str, Any]): dict representation of your SpcDriftProfile.
  • Returns: SpcDriftProfile
  • Return Type: SpcDriftProfile

The SpcFeatureDriftProfile is assigned to each feature when creating a SpcDriftProfile. The SpcFeatureDriftProfile will contain information about your features’s center and zone control limits.

PropertyTypeDescriptionExample
idstrThe name of the feature.profile.name"feature_1"
centerfloatMean of the sample for the feature.profile.center.6
one_uclfloatZone 1 upper control limit.profile.one_ucl.1
one_lclfloatZone 1 lower control limit.profile.one_lcl.2
two_uclfloatZone 2 upper control limit.profile.two_ucl.3
two_lclfloatZone 2 lower control limit.profile.two_lcl.4
three_uclfloatZone 3 upper control limit.profile.three_ucl.5
three_lclfloatZone 3 lower control limit.profile.three_lcl.6
timestampstrTime of creation.profile.timestamp"2025-03-13T14:30:00Z"