GenerationTokenStatisticsSignal Class
Note
This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
Generation token statistics signal definition.
- Inheritance
-
azure.ai.ml.entities._mixins.RestTranslatableMixinGenerationTokenStatisticsSignal
Constructor
GenerationTokenStatisticsSignal(*, production_data: LlmData | None = None, metric_thresholds: GenerationTokenStatisticsMonitorMetricThreshold | None = None, alert_enabled: bool = False, properties: Dict[str, str] | None = None, sampling_rate: float | None = None)
Keyword-Only Parameters
Name | Description |
---|---|
production_data
|
input dataset for monitoring. |
metric_thresholds
|
Metrics to calculate and their associated thresholds. Defaults to App Traces |
alert_enabled
|
Whether or not to enable alerts for the signal. Defaults to True. |
properties
|
The properties of the signal |
sampling_rate
|
The sample rate of the target data, should be greater than 0 and at most 1. |
Examples
Set Token Statistics Monitor.
spark_compute = ServerlessSparkCompute(instance_type="standard_e4s_v3", runtime_version="3.3")
monitoring_target = MonitoringTarget(
ml_task=MonitorTargetTasks.QUESTION_ANSWERING,
endpoint_deployment_id=f"azureml:{endpoint_name}:{deployment_name}",
)
monitoring_target = MonitoringTarget(
ml_task=MonitorTargetTasks.QUESTION_ANSWERING,
endpoint_deployment_id=f"azureml:{endpoint_name}:{deployment_name}",
)
monitor_settings = MonitorDefinition(compute=spark_compute, monitoring_target=monitoring_target)
model_monitor = MonitorSchedule(
name="qa_model_monitor", trigger=CronTrigger(expression="15 10 * * *"), create_monitor=monitor_settings
)
ml_client.schedules.begin_create_or_update(model_monitor)
Variables
Name | Description |
---|---|
type
|
The type of the signal. Set to "generationtokenstatisticssignal" for this class. |