1818
1919from azure .ai .ml ._utils ._experimental import experimental
2020from azure .ai .ml ._utils .utils import camel_to_snake , snake_to_camel
21- from azure .ai .ml .constants ._monitoring import MonitorDatasetContext
21+ from azure .ai .ml .constants ._monitoring import MonitorDatasetContext , MonitorInputDataType
2222
2323
2424@experimental
2525class MonitorInputData (RestTranslatableMixin ):
2626 """Monitor input data.
2727
28+ :keyword type: Specifies the type of monitoring input data.
29+ :paramtype type: MonitorInputDataType
2830 :keyword input_dataset: Input data used by the monitor
2931 :paramtype input_dataset: Optional[~azure.ai.ml.Input]
3032 :keyword dataset_context: The context of the input dataset. Accepted values are "model_inputs",
@@ -40,32 +42,37 @@ class MonitorInputData(RestTranslatableMixin):
4042 def __init__ (
4143 self ,
4244 * ,
43- input_type : str = None ,
45+ type : MonitorInputDataType = None ,
4446 data_context : MonitorDatasetContext = None ,
4547 target_columns : Dict = None ,
4648 job_type : str = None ,
4749 uri : str = None ,
4850 ):
49- self .input_type = input_type
51+ self .type = type
5052 self .data_context = data_context
5153 self .target_columns = target_columns
5254 self .job_type = job_type
5355 self .uri = uri
5456
5557 @classmethod
5658 def _from_rest_object (cls , obj : RestMonitorInputBase ) -> Optional ["MonitorInputData" ]:
57- if obj .input_data_type == "Fixed" :
59+ if obj .input_data_type == MonitorInputDataType . FIXED :
5860 return FixedInputData ._from_rest_object (obj )
59- if obj .input_data_type == "Trailing" :
61+ if obj .input_data_type == MonitorInputDataType . TRAILING :
6062 return TrailingInputData ._from_rest_object (obj )
61- if obj .input_data_type == "Static" :
63+ if obj .input_data_type == MonitorInputDataType . STATIC :
6264 return StaticInputData ._from_rest_object (obj )
6365
6466 return None
6567
6668
6769@experimental
6870class FixedInputData (MonitorInputData ):
71+ """
72+ :ivar type: Specifies the type of monitoring input data. Set automatically to "Fixed" for this class.
73+ :var type: MonitorInputDataType
74+ """
75+
6976 def __init__ (
7077 self ,
7178 * ,
@@ -75,7 +82,7 @@ def __init__(
7582 uri : str = None ,
7683 ):
7784 super ().__init__ (
78- input_type = "Fixed" ,
85+ type = MonitorInputDataType . FIXED ,
7986 data_context = data_context ,
8087 target_columns = target_columns ,
8188 job_type = job_type ,
@@ -102,6 +109,11 @@ def _from_rest_object(cls, obj: RestFixedInputData) -> "FixedInputData":
102109
103110@experimental
104111class TrailingInputData (MonitorInputData ):
112+ """
113+ :ivar type: Specifies the type of monitoring input data. Set automatically to "Trailing" for this class.
114+ :var type: MonitorInputDataType
115+ """
116+
105117 def __init__ (
106118 self ,
107119 * ,
@@ -114,7 +126,7 @@ def __init__(
114126 pre_processing_component_id : str = None ,
115127 ):
116128 super ().__init__ (
117- input_type = "Trailing" ,
129+ type = MonitorInputDataType . TRAILING ,
118130 data_context = data_context ,
119131 target_columns = target_columns ,
120132 job_type = job_type ,
@@ -150,6 +162,11 @@ def _from_rest_object(cls, obj: RestTrailingInputData) -> "TrailingInputData":
150162
151163@experimental
152164class StaticInputData (MonitorInputData ):
165+ """
166+ :ivar type: Specifies the type of monitoring input data. Set automatically to "Static" for this class.
167+ :var type: MonitorInputDataType
168+ """
169+
153170 def __init__ (
154171 self ,
155172 * ,
@@ -162,7 +179,7 @@ def __init__(
162179 window_end : str = None ,
163180 ):
164181 super ().__init__ (
165- input_type = "Static" ,
182+ type = MonitorInputDataType . STATIC ,
166183 data_context = data_context ,
167184 target_columns = target_columns ,
168185 job_type = job_type ,
0 commit comments