|
4 | 4 |
|
5 | 5 | # pylint: disable=protected-access |
6 | 6 |
|
7 | | -from typing import Dict, List, Optional, Union |
8 | 7 | import datetime |
9 | | -import isodate |
| 8 | +from typing import Dict, List, Optional, Union |
10 | 9 |
|
| 10 | +import isodate |
11 | 11 | from typing_extensions import Literal |
12 | 12 |
|
13 | | -from azure.ai.ml.entities._inputs_outputs import Input |
14 | | -from azure.ai.ml.entities._mixins import RestTranslatableMixin |
15 | | -from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
16 | | - MonitoringInputDataBase as RestMonitoringInputData, |
17 | | -) |
| 13 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import AllFeatures as RestAllFeatures |
| 14 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import CustomMonitoringSignal as RestCustomMonitoringSignal |
18 | 15 | from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
19 | | - MonitoringSignalBase as RestMonitoringSignalBase, |
20 | 16 | DataDriftMonitoringSignal as RestMonitoringDataDriftSignal, |
21 | 17 | ) |
22 | 18 | from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
23 | 19 | DataQualityMonitoringSignal as RestMonitoringDataQualitySignal, |
24 | 20 | ) |
25 | 21 | from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
26 | 22 | FeatureAttributionDriftMonitoringSignal as RestFeatureAttributionDriftMonitoringSignal, |
27 | | - ModelPerformanceSignal as RestModelPerformanceSignal, |
28 | | - CustomMonitoringSignal as RestCustomMonitoringSignal, |
29 | | - MonitoringDataSegment as RestMonitoringDataSegment, |
| 23 | +) |
| 24 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import FeatureSubset as RestFeatureSubset |
| 25 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import ModelPerformanceSignal as RestModelPerformanceSignal |
| 26 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import MonitoringDataSegment as RestMonitoringDataSegment |
| 27 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
30 | 28 | MonitoringFeatureFilterBase as RestMonitoringFeatureFilterBase, |
31 | 29 | ) |
| 30 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import MonitoringInputDataBase as RestMonitoringInputData |
32 | 31 | from azure.ai.ml._restclient.v2023_06_01_preview.models import MonitoringNotificationMode |
| 32 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import MonitoringSignalBase as RestMonitoringSignalBase |
33 | 33 | from azure.ai.ml._restclient.v2023_06_01_preview.models import MonitoringSignalType |
| 34 | +from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
| 35 | + MonitoringWorkspaceConnection as RestMonitoringWorkspaceConnection, |
| 36 | +) |
34 | 37 | from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
35 | 38 | PredictionDriftMonitoringSignal as RestPredictionDriftMonitoringSignal, |
36 | 39 | ) |
37 | 40 | from azure.ai.ml._restclient.v2023_06_01_preview.models import ( |
38 | 41 | TopNFeaturesByAttribution as RestTopNFeaturesByAttribution, |
39 | | - AllFeatures as RestAllFeatures, |
40 | | - FeatureSubset as RestFeatureSubset, |
41 | | - MonitoringWorkspaceConnection as RestMonitoringWorkspaceConnection, |
42 | 42 | ) |
43 | 43 | from azure.ai.ml._utils._experimental import experimental |
44 | 44 | from azure.ai.ml.constants._monitoring import ( |
45 | | - MonitorSignalType, |
46 | 45 | ALL_FEATURES, |
47 | | - MonitorModelType, |
48 | 46 | MonitorDatasetContext, |
49 | 47 | MonitorFeatureDataType, |
| 48 | + MonitorModelType, |
| 49 | + MonitorSignalType, |
50 | 50 | ) |
51 | | -from azure.ai.ml.entities._monitoring.input_data import ( |
52 | | - FixedInputData, |
53 | | - TrailingInputData, |
54 | | - StaticInputData, |
55 | | -) |
| 51 | +from azure.ai.ml.entities._inputs_outputs import Input |
| 52 | +from azure.ai.ml.entities._mixins import RestTranslatableMixin |
| 53 | +from azure.ai.ml.entities._monitoring.input_data import FixedInputData, StaticInputData, TrailingInputData |
56 | 54 | from azure.ai.ml.entities._monitoring.thresholds import ( |
| 55 | + CustomMonitoringMetricThreshold, |
57 | 56 | DataDriftMetricThreshold, |
58 | 57 | DataQualityMetricThreshold, |
59 | | - PredictionDriftMetricThreshold, |
60 | 58 | FeatureAttributionDriftMetricThreshold, |
61 | 59 | MetricThreshold, |
62 | 60 | ModelPerformanceMetricThreshold, |
63 | | - CustomMonitoringMetricThreshold, |
| 61 | + PredictionDriftMetricThreshold, |
64 | 62 | ) |
65 | 63 |
|
66 | 64 |
|
@@ -482,6 +480,8 @@ def _get_default_data_drift_signal(cls) -> "DataDriftSignal": |
482 | 480 | class PredictionDriftSignal(MonitoringSignal): |
483 | 481 | """Prediction drift signal. |
484 | 482 |
|
| 483 | + :ivar type: The type of the signal. Set to "prediction_drift" for this class. |
| 484 | + :vartype type: str |
485 | 485 | :keyword baseline_dataset: The dataset to calculate drift against. |
486 | 486 | :paramtype baseline_dataset: ~azure.ai.ml.entities.MonitorInputData |
487 | 487 | :keyword target_dataset: The dataset for which drift will be calculated. |
@@ -546,7 +546,8 @@ def _get_default_prediction_drift_signal(cls) -> "PredictionDriftSignal": |
546 | 546 | class DataQualitySignal(DataSignal): |
547 | 547 | """Data quality signal |
548 | 548 |
|
549 | | -
|
| 549 | + :ivar type: The type of the signal. Set to "data_quality" for this class. |
| 550 | + :vartype type: str |
550 | 551 | :keyword target_dataset: The data for which quality will be calculated. |
551 | 552 | :paramtype target_dataset: ~azure.ai.ml.entities.TargetDataset |
552 | 553 | :keyword baseline_dataset: The data to calculate quality against. |
@@ -714,6 +715,8 @@ def _from_rest_object(cls, obj: RestMonitoringInputData) -> "FADProductionData": |
714 | 715 | class FeatureAttributionDriftSignal(RestTranslatableMixin): |
715 | 716 | """Feature attribution drift signal |
716 | 717 |
|
| 718 | + :ivar type: The type of the signal. Set to "feature_attribution_drift" for this class. |
| 719 | + :vartype type: str |
717 | 720 | :keyword target_dataset: The data for which drift will be calculated. |
718 | 721 | :paramtype target_dataset: ~azure.ai.ml.entities.TargetDataset |
719 | 722 | :keyword baseline_dataset: The data to calculate drift against. |
@@ -861,6 +864,8 @@ def _from_rest_object(cls, obj: RestMonitoringWorkspaceConnection) -> "Workspace |
861 | 864 | class CustomMonitoringSignal(RestTranslatableMixin): |
862 | 865 | """Custom monitoring signal. |
863 | 866 |
|
| 867 | + :ivar type: The type of the signal. Set to "custom" for this class. |
| 868 | + :vartype type: str |
864 | 869 | :keyword input_datasets: A dictionary of input datasets for monitoring. |
865 | 870 | Each key is the component input port name, and its value is the data asset. |
866 | 871 | :paramtype input_datasets: Optional[dict[str, ~azure.ai.ml.entities.MonitorInputData]] |
|
0 commit comments