databricks-sdk 0.57.0__py3-none-any.whl → 0.58.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of databricks-sdk might be problematic. Click here for more details.

Files changed (30) hide show
  1. databricks/sdk/__init__.py +25 -4
  2. databricks/sdk/service/aibuilder.py +0 -36
  3. databricks/sdk/service/apps.py +1 -3
  4. databricks/sdk/service/billing.py +53 -23
  5. databricks/sdk/service/catalog.py +1692 -150
  6. databricks/sdk/service/cleanrooms.py +3 -22
  7. databricks/sdk/service/compute.py +245 -322
  8. databricks/sdk/service/dashboards.py +129 -162
  9. databricks/sdk/service/database.py +612 -97
  10. databricks/sdk/service/iam.py +3 -3
  11. databricks/sdk/service/jobs.py +6 -129
  12. databricks/sdk/service/marketplace.py +3 -2
  13. databricks/sdk/service/ml.py +713 -262
  14. databricks/sdk/service/oauth2.py +0 -1
  15. databricks/sdk/service/pipelines.py +12 -29
  16. databricks/sdk/service/provisioning.py +7 -125
  17. databricks/sdk/service/qualitymonitorv2.py +0 -18
  18. databricks/sdk/service/serving.py +39 -13
  19. databricks/sdk/service/settings.py +11 -128
  20. databricks/sdk/service/sharing.py +3 -9
  21. databricks/sdk/service/sql.py +94 -74
  22. databricks/sdk/service/vectorsearch.py +0 -19
  23. databricks/sdk/service/workspace.py +2 -6
  24. databricks/sdk/version.py +1 -1
  25. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.58.0.dist-info}/METADATA +1 -1
  26. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.58.0.dist-info}/RECORD +30 -30
  27. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.58.0.dist-info}/WHEEL +0 -0
  28. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/LICENSE +0 -0
  29. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/NOTICE +0 -0
  30. {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.58.0.dist-info}/top_level.txt +0 -0
@@ -21,30 +21,18 @@ _LOG = logging.getLogger("databricks.sdk")
21
21
 
22
22
  @dataclass
23
23
  class Activity:
24
- """Activity recorded for the action."""
24
+ """For activities, this contains the activity recorded for the action. For comments, this contains
25
+ the comment details. For transition requests, this contains the transition request details."""
25
26
 
26
27
  activity_type: Optional[ActivityType] = None
27
- """Type of activity. Valid values are: * `APPLIED_TRANSITION`: User applied the corresponding stage
28
- transition.
29
-
30
- * `REQUESTED_TRANSITION`: User requested the corresponding stage transition.
31
-
32
- * `CANCELLED_REQUEST`: User cancelled an existing transition request.
33
-
34
- * `APPROVED_REQUEST`: User approved the corresponding stage transition.
35
-
36
- * `REJECTED_REQUEST`: User rejected the coressponding stage transition.
37
-
38
- * `SYSTEM_TRANSITION`: For events performed as a side effect, such as archiving existing model
39
- versions in a stage."""
40
28
 
41
29
  comment: Optional[str] = None
42
- """User-provided comment associated with the activity."""
30
+ """User-provided comment associated with the activity, comment, or transition request."""
43
31
 
44
32
  creation_timestamp: Optional[int] = None
45
33
  """Creation time of the object, as a Unix timestamp in milliseconds."""
46
34
 
47
- from_stage: Optional[Stage] = None
35
+ from_stage: Optional[str] = None
48
36
  """Source stage of the transition (if the activity is stage transition related). Valid values are:
49
37
 
50
38
  * `None`: The initial stage of a model version.
@@ -66,7 +54,7 @@ class Activity:
66
54
  usually describes a side effect, such as a version being archived as part of another version's
67
55
  stage transition, and may not be returned for some activity types."""
68
56
 
69
- to_stage: Optional[Stage] = None
57
+ to_stage: Optional[str] = None
70
58
  """Target stage of the transition (if the activity is stage transition related). Valid values are:
71
59
 
72
60
  * `None`: The initial stage of a model version.
@@ -90,7 +78,7 @@ class Activity:
90
78
  if self.creation_timestamp is not None:
91
79
  body["creation_timestamp"] = self.creation_timestamp
92
80
  if self.from_stage is not None:
93
- body["from_stage"] = self.from_stage.value
81
+ body["from_stage"] = self.from_stage
94
82
  if self.id is not None:
95
83
  body["id"] = self.id
96
84
  if self.last_updated_timestamp is not None:
@@ -98,7 +86,7 @@ class Activity:
98
86
  if self.system_comment is not None:
99
87
  body["system_comment"] = self.system_comment
100
88
  if self.to_stage is not None:
101
- body["to_stage"] = self.to_stage.value
89
+ body["to_stage"] = self.to_stage
102
90
  if self.user_id is not None:
103
91
  body["user_id"] = self.user_id
104
92
  return body
@@ -133,25 +121,32 @@ class Activity:
133
121
  activity_type=_enum(d, "activity_type", ActivityType),
134
122
  comment=d.get("comment", None),
135
123
  creation_timestamp=d.get("creation_timestamp", None),
136
- from_stage=_enum(d, "from_stage", Stage),
124
+ from_stage=d.get("from_stage", None),
137
125
  id=d.get("id", None),
138
126
  last_updated_timestamp=d.get("last_updated_timestamp", None),
139
127
  system_comment=d.get("system_comment", None),
140
- to_stage=_enum(d, "to_stage", Stage),
128
+ to_stage=d.get("to_stage", None),
141
129
  user_id=d.get("user_id", None),
142
130
  )
143
131
 
144
132
 
145
133
  class ActivityAction(Enum):
146
- """An action that a user (with sufficient permissions) could take on an activity. Valid values are:
147
- * `APPROVE_TRANSITION_REQUEST`: Approve a transition request
134
+ """An action that a user (with sufficient permissions) could take on an activity or comment.
135
+
136
+ For activities, valid values are: * `APPROVE_TRANSITION_REQUEST`: Approve a transition request
148
137
 
149
138
  * `REJECT_TRANSITION_REQUEST`: Reject a transition request
150
139
 
151
- * `CANCEL_TRANSITION_REQUEST`: Cancel (delete) a transition request"""
140
+ * `CANCEL_TRANSITION_REQUEST`: Cancel (delete) a transition request
141
+
142
+ For comments, valid values are: * `EDIT_COMMENT`: Edit the comment
143
+
144
+ * `DELETE_COMMENT`: Delete the comment"""
152
145
 
153
146
  APPROVE_TRANSITION_REQUEST = "APPROVE_TRANSITION_REQUEST"
154
147
  CANCEL_TRANSITION_REQUEST = "CANCEL_TRANSITION_REQUEST"
148
+ DELETE_COMMENT = "DELETE_COMMENT"
149
+ EDIT_COMMENT = "EDIT_COMMENT"
155
150
  REJECT_TRANSITION_REQUEST = "REJECT_TRANSITION_REQUEST"
156
151
 
157
152
 
@@ -181,13 +176,15 @@ class ActivityType(Enum):
181
176
 
182
177
  @dataclass
183
178
  class ApproveTransitionRequest:
179
+ """Details required to identify and approve a model version stage transition request."""
180
+
184
181
  name: str
185
182
  """Name of the model."""
186
183
 
187
184
  version: str
188
185
  """Version of the model."""
189
186
 
190
- stage: Stage
187
+ stage: str
191
188
  """Target stage of the transition. Valid values are:
192
189
 
193
190
  * `None`: The initial stage of a model version.
@@ -214,7 +211,7 @@ class ApproveTransitionRequest:
214
211
  if self.name is not None:
215
212
  body["name"] = self.name
216
213
  if self.stage is not None:
217
- body["stage"] = self.stage.value
214
+ body["stage"] = self.stage
218
215
  if self.version is not None:
219
216
  body["version"] = self.version
220
217
  return body
@@ -241,7 +238,7 @@ class ApproveTransitionRequest:
241
238
  archive_existing_versions=d.get("archive_existing_versions", None),
242
239
  comment=d.get("comment", None),
243
240
  name=d.get("name", None),
244
- stage=_enum(d, "stage", Stage),
241
+ stage=d.get("stage", None),
245
242
  version=d.get("version", None),
246
243
  )
247
244
 
@@ -249,7 +246,7 @@ class ApproveTransitionRequest:
249
246
  @dataclass
250
247
  class ApproveTransitionRequestResponse:
251
248
  activity: Optional[Activity] = None
252
- """Activity recorded for the action."""
249
+ """New activity generated as a result of this operation."""
253
250
 
254
251
  def as_dict(self) -> dict:
255
252
  """Serializes the ApproveTransitionRequestResponse into a dictionary suitable for use as a JSON request body."""
@@ -272,30 +269,41 @@ class ApproveTransitionRequestResponse:
272
269
 
273
270
 
274
271
  class CommentActivityAction(Enum):
275
- """An action that a user (with sufficient permissions) could take on a comment. Valid values are: *
276
- `EDIT_COMMENT`: Edit the comment
272
+ """An action that a user (with sufficient permissions) could take on an activity or comment.
273
+
274
+ For activities, valid values are: * `APPROVE_TRANSITION_REQUEST`: Approve a transition request
275
+
276
+ * `REJECT_TRANSITION_REQUEST`: Reject a transition request
277
+
278
+ * `CANCEL_TRANSITION_REQUEST`: Cancel (delete) a transition request
279
+
280
+ For comments, valid values are: * `EDIT_COMMENT`: Edit the comment
277
281
 
278
282
  * `DELETE_COMMENT`: Delete the comment"""
279
283
 
284
+ APPROVE_TRANSITION_REQUEST = "APPROVE_TRANSITION_REQUEST"
285
+ CANCEL_TRANSITION_REQUEST = "CANCEL_TRANSITION_REQUEST"
280
286
  DELETE_COMMENT = "DELETE_COMMENT"
281
287
  EDIT_COMMENT = "EDIT_COMMENT"
288
+ REJECT_TRANSITION_REQUEST = "REJECT_TRANSITION_REQUEST"
282
289
 
283
290
 
284
291
  @dataclass
285
292
  class CommentObject:
286
- """Comment details."""
293
+ """For activities, this contains the activity recorded for the action. For comments, this contains
294
+ the comment details. For transition requests, this contains the transition request details."""
287
295
 
288
296
  available_actions: Optional[List[CommentActivityAction]] = None
289
297
  """Array of actions on the activity allowed for the current viewer."""
290
298
 
291
299
  comment: Optional[str] = None
292
- """User-provided comment on the action."""
300
+ """User-provided comment associated with the activity, comment, or transition request."""
293
301
 
294
302
  creation_timestamp: Optional[int] = None
295
303
  """Creation time of the object, as a Unix timestamp in milliseconds."""
296
304
 
297
305
  id: Optional[str] = None
298
- """Comment ID"""
306
+ """Unique identifier for the object."""
299
307
 
300
308
  last_updated_timestamp: Optional[int] = None
301
309
  """Time of the object at last update, as a Unix timestamp in milliseconds."""
@@ -352,6 +360,8 @@ class CommentObject:
352
360
 
353
361
  @dataclass
354
362
  class CreateComment:
363
+ """Details required to create a comment on a model version."""
364
+
355
365
  name: str
356
366
  """Name of the model."""
357
367
 
@@ -392,7 +402,7 @@ class CreateComment:
392
402
  @dataclass
393
403
  class CreateCommentResponse:
394
404
  comment: Optional[CommentObject] = None
395
- """Comment details."""
405
+ """New comment object"""
396
406
 
397
407
  def as_dict(self) -> dict:
398
408
  """Serializes the CreateCommentResponse into a dictionary suitable for use as a JSON request body."""
@@ -935,6 +945,8 @@ class CreateModelVersionResponse:
935
945
 
936
946
  @dataclass
937
947
  class CreateRegistryWebhook:
948
+ """Details required to create a registry webhook."""
949
+
938
950
  events: List[RegistryWebhookEvent]
939
951
  """Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A new model version was
940
952
  created for the associated model.
@@ -969,8 +981,10 @@ class CreateRegistryWebhook:
969
981
  """User-specified description for the webhook."""
970
982
 
971
983
  http_url_spec: Optional[HttpUrlSpec] = None
984
+ """External HTTPS URL called on event trigger (by using a POST request)."""
972
985
 
973
986
  job_spec: Optional[JobSpec] = None
987
+ """ID of the job that the webhook runs."""
974
988
 
975
989
  model_name: Optional[str] = None
976
990
  """If model name is not specified, a registry-wide webhook is created that listens for the
@@ -1119,13 +1133,15 @@ class CreateRunResponse:
1119
1133
 
1120
1134
  @dataclass
1121
1135
  class CreateTransitionRequest:
1136
+ """Details required to create a model version stage transition request."""
1137
+
1122
1138
  name: str
1123
1139
  """Name of the model."""
1124
1140
 
1125
1141
  version: str
1126
1142
  """Version of the model."""
1127
1143
 
1128
- stage: Stage
1144
+ stage: str
1129
1145
  """Target stage of the transition. Valid values are:
1130
1146
 
1131
1147
  * `None`: The initial stage of a model version.
@@ -1147,7 +1163,7 @@ class CreateTransitionRequest:
1147
1163
  if self.name is not None:
1148
1164
  body["name"] = self.name
1149
1165
  if self.stage is not None:
1150
- body["stage"] = self.stage.value
1166
+ body["stage"] = self.stage
1151
1167
  if self.version is not None:
1152
1168
  body["version"] = self.version
1153
1169
  return body
@@ -1171,7 +1187,7 @@ class CreateTransitionRequest:
1171
1187
  return cls(
1172
1188
  comment=d.get("comment", None),
1173
1189
  name=d.get("name", None),
1174
- stage=_enum(d, "stage", Stage),
1190
+ stage=d.get("stage", None),
1175
1191
  version=d.get("version", None),
1176
1192
  )
1177
1193
 
@@ -1179,7 +1195,7 @@ class CreateTransitionRequest:
1179
1195
  @dataclass
1180
1196
  class CreateTransitionRequestResponse:
1181
1197
  request: Optional[TransitionRequest] = None
1182
- """Transition request details."""
1198
+ """New activity generated for stage transition request."""
1183
1199
 
1184
1200
  def as_dict(self) -> dict:
1185
1201
  """Serializes the CreateTransitionRequestResponse into a dictionary suitable for use as a JSON request body."""
@@ -1502,24 +1518,6 @@ class DeleteModelVersionTagResponse:
1502
1518
  return cls()
1503
1519
 
1504
1520
 
1505
- @dataclass
1506
- class DeleteOnlineStoreResponse:
1507
- def as_dict(self) -> dict:
1508
- """Serializes the DeleteOnlineStoreResponse into a dictionary suitable for use as a JSON request body."""
1509
- body = {}
1510
- return body
1511
-
1512
- def as_shallow_dict(self) -> dict:
1513
- """Serializes the DeleteOnlineStoreResponse into a shallow dictionary of its immediate attributes."""
1514
- body = {}
1515
- return body
1516
-
1517
- @classmethod
1518
- def from_dict(cls, d: Dict[str, Any]) -> DeleteOnlineStoreResponse:
1519
- """Deserializes the DeleteOnlineStoreResponse from a dictionary."""
1520
- return cls()
1521
-
1522
-
1523
1521
  @dataclass
1524
1522
  class DeleteRun:
1525
1523
  run_id: str
@@ -1685,28 +1683,27 @@ class DeleteTagResponse:
1685
1683
 
1686
1684
  @dataclass
1687
1685
  class DeleteTransitionRequestResponse:
1686
+ activity: Optional[Activity] = None
1687
+ """New activity generated as a result of this operation."""
1688
+
1688
1689
  def as_dict(self) -> dict:
1689
1690
  """Serializes the DeleteTransitionRequestResponse into a dictionary suitable for use as a JSON request body."""
1690
1691
  body = {}
1692
+ if self.activity:
1693
+ body["activity"] = self.activity.as_dict()
1691
1694
  return body
1692
1695
 
1693
1696
  def as_shallow_dict(self) -> dict:
1694
1697
  """Serializes the DeleteTransitionRequestResponse into a shallow dictionary of its immediate attributes."""
1695
1698
  body = {}
1699
+ if self.activity:
1700
+ body["activity"] = self.activity
1696
1701
  return body
1697
1702
 
1698
1703
  @classmethod
1699
1704
  def from_dict(cls, d: Dict[str, Any]) -> DeleteTransitionRequestResponse:
1700
1705
  """Deserializes the DeleteTransitionRequestResponse from a dictionary."""
1701
- return cls()
1702
-
1703
-
1704
- class DeleteTransitionRequestStage(Enum):
1705
-
1706
- ARCHIVED = "Archived"
1707
- NONE = "None"
1708
- PRODUCTION = "Production"
1709
- STAGING = "Staging"
1706
+ return cls(activity=_from_dict(d, "activity", Activity))
1710
1707
 
1711
1708
 
1712
1709
  @dataclass
@@ -1811,7 +1808,6 @@ class ExperimentAccessControlRequest:
1811
1808
  """name of the group"""
1812
1809
 
1813
1810
  permission_level: Optional[ExperimentPermissionLevel] = None
1814
- """Permission level"""
1815
1811
 
1816
1812
  service_principal_name: Optional[str] = None
1817
1813
  """application ID of a service principal"""
@@ -1922,7 +1918,6 @@ class ExperimentPermission:
1922
1918
  inherited_from_object: Optional[List[str]] = None
1923
1919
 
1924
1920
  permission_level: Optional[ExperimentPermissionLevel] = None
1925
- """Permission level"""
1926
1921
 
1927
1922
  def as_dict(self) -> dict:
1928
1923
  """Serializes the ExperimentPermission into a dictionary suitable for use as a JSON request body."""
@@ -2009,7 +2004,6 @@ class ExperimentPermissionsDescription:
2009
2004
  description: Optional[str] = None
2010
2005
 
2011
2006
  permission_level: Optional[ExperimentPermissionLevel] = None
2012
- """Permission level"""
2013
2007
 
2014
2008
  def as_dict(self) -> dict:
2015
2009
  """Serializes the ExperimentPermissionsDescription into a dictionary suitable for use as a JSON request body."""
@@ -2106,6 +2100,241 @@ class ExperimentTag:
2106
2100
  return cls(key=d.get("key", None), value=d.get("value", None))
2107
2101
 
2108
2102
 
2103
+ @dataclass
2104
+ class Feature:
2105
+ """Feature for model version."""
2106
+
2107
+ feature_name: Optional[str] = None
2108
+ """Feature name"""
2109
+
2110
+ feature_table_id: Optional[str] = None
2111
+ """Feature table id"""
2112
+
2113
+ feature_table_name: Optional[str] = None
2114
+ """Feature table name"""
2115
+
2116
+ def as_dict(self) -> dict:
2117
+ """Serializes the Feature into a dictionary suitable for use as a JSON request body."""
2118
+ body = {}
2119
+ if self.feature_name is not None:
2120
+ body["feature_name"] = self.feature_name
2121
+ if self.feature_table_id is not None:
2122
+ body["feature_table_id"] = self.feature_table_id
2123
+ if self.feature_table_name is not None:
2124
+ body["feature_table_name"] = self.feature_table_name
2125
+ return body
2126
+
2127
+ def as_shallow_dict(self) -> dict:
2128
+ """Serializes the Feature into a shallow dictionary of its immediate attributes."""
2129
+ body = {}
2130
+ if self.feature_name is not None:
2131
+ body["feature_name"] = self.feature_name
2132
+ if self.feature_table_id is not None:
2133
+ body["feature_table_id"] = self.feature_table_id
2134
+ if self.feature_table_name is not None:
2135
+ body["feature_table_name"] = self.feature_table_name
2136
+ return body
2137
+
2138
+ @classmethod
2139
+ def from_dict(cls, d: Dict[str, Any]) -> Feature:
2140
+ """Deserializes the Feature from a dictionary."""
2141
+ return cls(
2142
+ feature_name=d.get("feature_name", None),
2143
+ feature_table_id=d.get("feature_table_id", None),
2144
+ feature_table_name=d.get("feature_table_name", None),
2145
+ )
2146
+
2147
+
2148
+ @dataclass
2149
+ class FeatureLineage:
2150
+ feature_specs: Optional[List[FeatureLineageFeatureSpec]] = None
2151
+ """List of feature specs that contain this feature."""
2152
+
2153
+ models: Optional[List[FeatureLineageModel]] = None
2154
+ """List of Unity Catalog models that were trained on this feature."""
2155
+
2156
+ online_features: Optional[List[FeatureLineageOnlineFeature]] = None
2157
+ """List of online features that use this feature as source."""
2158
+
2159
+ def as_dict(self) -> dict:
2160
+ """Serializes the FeatureLineage into a dictionary suitable for use as a JSON request body."""
2161
+ body = {}
2162
+ if self.feature_specs:
2163
+ body["feature_specs"] = [v.as_dict() for v in self.feature_specs]
2164
+ if self.models:
2165
+ body["models"] = [v.as_dict() for v in self.models]
2166
+ if self.online_features:
2167
+ body["online_features"] = [v.as_dict() for v in self.online_features]
2168
+ return body
2169
+
2170
+ def as_shallow_dict(self) -> dict:
2171
+ """Serializes the FeatureLineage into a shallow dictionary of its immediate attributes."""
2172
+ body = {}
2173
+ if self.feature_specs:
2174
+ body["feature_specs"] = self.feature_specs
2175
+ if self.models:
2176
+ body["models"] = self.models
2177
+ if self.online_features:
2178
+ body["online_features"] = self.online_features
2179
+ return body
2180
+
2181
+ @classmethod
2182
+ def from_dict(cls, d: Dict[str, Any]) -> FeatureLineage:
2183
+ """Deserializes the FeatureLineage from a dictionary."""
2184
+ return cls(
2185
+ feature_specs=_repeated_dict(d, "feature_specs", FeatureLineageFeatureSpec),
2186
+ models=_repeated_dict(d, "models", FeatureLineageModel),
2187
+ online_features=_repeated_dict(d, "online_features", FeatureLineageOnlineFeature),
2188
+ )
2189
+
2190
+
2191
+ @dataclass
2192
+ class FeatureLineageFeatureSpec:
2193
+ name: Optional[str] = None
2194
+ """The full name of the feature spec in Unity Catalog."""
2195
+
2196
+ def as_dict(self) -> dict:
2197
+ """Serializes the FeatureLineageFeatureSpec into a dictionary suitable for use as a JSON request body."""
2198
+ body = {}
2199
+ if self.name is not None:
2200
+ body["name"] = self.name
2201
+ return body
2202
+
2203
+ def as_shallow_dict(self) -> dict:
2204
+ """Serializes the FeatureLineageFeatureSpec into a shallow dictionary of its immediate attributes."""
2205
+ body = {}
2206
+ if self.name is not None:
2207
+ body["name"] = self.name
2208
+ return body
2209
+
2210
+ @classmethod
2211
+ def from_dict(cls, d: Dict[str, Any]) -> FeatureLineageFeatureSpec:
2212
+ """Deserializes the FeatureLineageFeatureSpec from a dictionary."""
2213
+ return cls(name=d.get("name", None))
2214
+
2215
+
2216
+ @dataclass
2217
+ class FeatureLineageModel:
2218
+ name: Optional[str] = None
2219
+ """The full name of the model in Unity Catalog."""
2220
+
2221
+ version: Optional[int] = None
2222
+ """The version of the model."""
2223
+
2224
+ def as_dict(self) -> dict:
2225
+ """Serializes the FeatureLineageModel into a dictionary suitable for use as a JSON request body."""
2226
+ body = {}
2227
+ if self.name is not None:
2228
+ body["name"] = self.name
2229
+ if self.version is not None:
2230
+ body["version"] = self.version
2231
+ return body
2232
+
2233
+ def as_shallow_dict(self) -> dict:
2234
+ """Serializes the FeatureLineageModel into a shallow dictionary of its immediate attributes."""
2235
+ body = {}
2236
+ if self.name is not None:
2237
+ body["name"] = self.name
2238
+ if self.version is not None:
2239
+ body["version"] = self.version
2240
+ return body
2241
+
2242
+ @classmethod
2243
+ def from_dict(cls, d: Dict[str, Any]) -> FeatureLineageModel:
2244
+ """Deserializes the FeatureLineageModel from a dictionary."""
2245
+ return cls(name=d.get("name", None), version=d.get("version", None))
2246
+
2247
+
2248
+ @dataclass
2249
+ class FeatureLineageOnlineFeature:
2250
+ feature_name: Optional[str] = None
2251
+ """The name of the online feature (column name)."""
2252
+
2253
+ table_name: Optional[str] = None
2254
+ """The full name of the online table in Unity Catalog."""
2255
+
2256
+ def as_dict(self) -> dict:
2257
+ """Serializes the FeatureLineageOnlineFeature into a dictionary suitable for use as a JSON request body."""
2258
+ body = {}
2259
+ if self.feature_name is not None:
2260
+ body["feature_name"] = self.feature_name
2261
+ if self.table_name is not None:
2262
+ body["table_name"] = self.table_name
2263
+ return body
2264
+
2265
+ def as_shallow_dict(self) -> dict:
2266
+ """Serializes the FeatureLineageOnlineFeature into a shallow dictionary of its immediate attributes."""
2267
+ body = {}
2268
+ if self.feature_name is not None:
2269
+ body["feature_name"] = self.feature_name
2270
+ if self.table_name is not None:
2271
+ body["table_name"] = self.table_name
2272
+ return body
2273
+
2274
+ @classmethod
2275
+ def from_dict(cls, d: Dict[str, Any]) -> FeatureLineageOnlineFeature:
2276
+ """Deserializes the FeatureLineageOnlineFeature from a dictionary."""
2277
+ return cls(feature_name=d.get("feature_name", None), table_name=d.get("table_name", None))
2278
+
2279
+
2280
+ @dataclass
2281
+ class FeatureList:
2282
+ """Feature list wrap all the features for a model version"""
2283
+
2284
+ features: Optional[List[Feature]] = None
2285
+
2286
+ def as_dict(self) -> dict:
2287
+ """Serializes the FeatureList into a dictionary suitable for use as a JSON request body."""
2288
+ body = {}
2289
+ if self.features:
2290
+ body["features"] = [v.as_dict() for v in self.features]
2291
+ return body
2292
+
2293
+ def as_shallow_dict(self) -> dict:
2294
+ """Serializes the FeatureList into a shallow dictionary of its immediate attributes."""
2295
+ body = {}
2296
+ if self.features:
2297
+ body["features"] = self.features
2298
+ return body
2299
+
2300
+ @classmethod
2301
+ def from_dict(cls, d: Dict[str, Any]) -> FeatureList:
2302
+ """Deserializes the FeatureList from a dictionary."""
2303
+ return cls(features=_repeated_dict(d, "features", Feature))
2304
+
2305
+
2306
+ @dataclass
2307
+ class FeatureTag:
2308
+ """Represents a tag on a feature in a feature table."""
2309
+
2310
+ key: str
2311
+
2312
+ value: Optional[str] = None
2313
+
2314
+ def as_dict(self) -> dict:
2315
+ """Serializes the FeatureTag into a dictionary suitable for use as a JSON request body."""
2316
+ body = {}
2317
+ if self.key is not None:
2318
+ body["key"] = self.key
2319
+ if self.value is not None:
2320
+ body["value"] = self.value
2321
+ return body
2322
+
2323
+ def as_shallow_dict(self) -> dict:
2324
+ """Serializes the FeatureTag into a shallow dictionary of its immediate attributes."""
2325
+ body = {}
2326
+ if self.key is not None:
2327
+ body["key"] = self.key
2328
+ if self.value is not None:
2329
+ body["value"] = self.value
2330
+ return body
2331
+
2332
+ @classmethod
2333
+ def from_dict(cls, d: Dict[str, Any]) -> FeatureTag:
2334
+ """Deserializes the FeatureTag from a dictionary."""
2335
+ return cls(key=d.get("key", None), value=d.get("value", None))
2336
+
2337
+
2109
2338
  @dataclass
2110
2339
  class FileInfo:
2111
2340
  """Metadata of a single artifact file or directory."""
@@ -2753,9 +2982,8 @@ class JobSpecWithoutSecret:
2753
2982
  """ID of the job that the webhook runs."""
2754
2983
 
2755
2984
  workspace_url: Optional[str] = None
2756
- """URL of the workspace containing the job that this webhook runs. Defaults to the workspace URL in
2757
- which the webhook is created. If not specified, the job’s workspace is assumed to be the same
2758
- as the webhook’s."""
2985
+ """URL of the workspace containing the job that this webhook runs. If not specified, the job’s
2986
+ workspace URL is assumed to be the same as the workspace where the webhook is created."""
2759
2987
 
2760
2988
  def as_dict(self) -> dict:
2761
2989
  """Serializes the JobSpecWithoutSecret into a dictionary suitable for use as a JSON request body."""
@@ -2859,6 +3087,41 @@ class ListExperimentsResponse:
2859
3087
  )
2860
3088
 
2861
3089
 
3090
+ @dataclass
3091
+ class ListFeatureTagsResponse:
3092
+ """Response message for ListFeatureTag."""
3093
+
3094
+ feature_tags: Optional[List[FeatureTag]] = None
3095
+
3096
+ next_page_token: Optional[str] = None
3097
+ """Pagination token to request the next page of results for this query."""
3098
+
3099
+ def as_dict(self) -> dict:
3100
+ """Serializes the ListFeatureTagsResponse into a dictionary suitable for use as a JSON request body."""
3101
+ body = {}
3102
+ if self.feature_tags:
3103
+ body["feature_tags"] = [v.as_dict() for v in self.feature_tags]
3104
+ if self.next_page_token is not None:
3105
+ body["next_page_token"] = self.next_page_token
3106
+ return body
3107
+
3108
+ def as_shallow_dict(self) -> dict:
3109
+ """Serializes the ListFeatureTagsResponse into a shallow dictionary of its immediate attributes."""
3110
+ body = {}
3111
+ if self.feature_tags:
3112
+ body["feature_tags"] = self.feature_tags
3113
+ if self.next_page_token is not None:
3114
+ body["next_page_token"] = self.next_page_token
3115
+ return body
3116
+
3117
+ @classmethod
3118
+ def from_dict(cls, d: Dict[str, Any]) -> ListFeatureTagsResponse:
3119
+ """Deserializes the ListFeatureTagsResponse from a dictionary."""
3120
+ return cls(
3121
+ feature_tags=_repeated_dict(d, "feature_tags", FeatureTag), next_page_token=d.get("next_page_token", None)
3122
+ )
3123
+
3124
+
2862
3125
  @dataclass
2863
3126
  class ListModelsResponse:
2864
3127
  next_page_token: Optional[str] = None
@@ -3892,7 +4155,7 @@ class ModelDatabricks:
3892
4155
  """Unique identifier for the object."""
3893
4156
 
3894
4157
  last_updated_timestamp: Optional[int] = None
3895
- """Time of the object at last update, as a Unix timestamp in milliseconds."""
4158
+ """Last update time of the object, as a Unix timestamp in milliseconds."""
3896
4159
 
3897
4160
  latest_versions: Optional[List[ModelVersion]] = None
3898
4161
  """Array of model versions, each the latest version for its stage."""
@@ -3901,8 +4164,7 @@ class ModelDatabricks:
3901
4164
  """Name of the model."""
3902
4165
 
3903
4166
  permission_level: Optional[PermissionLevel] = None
3904
- """Permission level of the requesting user on the object. For what is allowed at each level, see
3905
- [MLflow Model permissions](..)."""
4167
+ """Permission level granted for the requesting user on this registered model"""
3906
4168
 
3907
4169
  tags: Optional[List[ModelTag]] = None
3908
4170
  """Array of tags associated with the model."""
@@ -4035,6 +4297,8 @@ class ModelOutput:
4035
4297
 
4036
4298
  @dataclass
4037
4299
  class ModelTag:
4300
+ """Tag for a registered model"""
4301
+
4038
4302
  key: Optional[str] = None
4039
4303
  """The tag key."""
4040
4304
 
@@ -4194,29 +4458,29 @@ class ModelVersionDatabricks:
4194
4458
  creation_timestamp: Optional[int] = None
4195
4459
  """Creation time of the object, as a Unix timestamp in milliseconds."""
4196
4460
 
4197
- current_stage: Optional[Stage] = None
4198
- """Stage of the model version. Valid values are:
4199
-
4200
- * `None`: The initial stage of a model version.
4201
-
4202
- * `Staging`: Staging or pre-production stage.
4203
-
4204
- * `Production`: Production stage.
4205
-
4206
- * `Archived`: Archived stage."""
4461
+ current_stage: Optional[str] = None
4207
4462
 
4208
4463
  description: Optional[str] = None
4209
4464
  """User-specified description for the object."""
4210
4465
 
4466
+ email_subscription_status: Optional[RegistryEmailSubscriptionType] = None
4467
+ """Email Subscription Status: This is the subscription status of the user to the model version
4468
+ Users get subscribed by interacting with the model version."""
4469
+
4470
+ feature_list: Optional[FeatureList] = None
4471
+ """Feature lineage of `model_version`."""
4472
+
4211
4473
  last_updated_timestamp: Optional[int] = None
4212
4474
  """Time of the object at last update, as a Unix timestamp in milliseconds."""
4213
4475
 
4214
4476
  name: Optional[str] = None
4215
4477
  """Name of the model."""
4216
4478
 
4479
+ open_requests: Optional[List[Activity]] = None
4480
+ """Open requests for this `model_versions`. Gap in sequence number is intentional and is done in
4481
+ order to match field sequence numbers of `ModelVersion` proto message"""
4482
+
4217
4483
  permission_level: Optional[PermissionLevel] = None
4218
- """Permission level of the requesting user on the object. For what is allowed at each level, see
4219
- [MLflow Model permissions](..)."""
4220
4484
 
4221
4485
  run_id: Optional[str] = None
4222
4486
  """Unique identifier for the MLflow tracking run associated with the source model artifacts."""
@@ -4231,12 +4495,6 @@ class ModelVersionDatabricks:
4231
4495
  model version."""
4232
4496
 
4233
4497
  status: Optional[Status] = None
4234
- """The status of the model version. Valid values are: * `PENDING_REGISTRATION`: Request to register
4235
- a new model version is pending as server performs background tasks.
4236
-
4237
- * `FAILED_REGISTRATION`: Request to register a new model version has failed.
4238
-
4239
- * `READY`: Model version is ready for use."""
4240
4498
 
4241
4499
  status_message: Optional[str] = None
4242
4500
  """Details on the current status, for example why registration failed."""
@@ -4256,13 +4514,19 @@ class ModelVersionDatabricks:
4256
4514
  if self.creation_timestamp is not None:
4257
4515
  body["creation_timestamp"] = self.creation_timestamp
4258
4516
  if self.current_stage is not None:
4259
- body["current_stage"] = self.current_stage.value
4517
+ body["current_stage"] = self.current_stage
4260
4518
  if self.description is not None:
4261
4519
  body["description"] = self.description
4520
+ if self.email_subscription_status is not None:
4521
+ body["email_subscription_status"] = self.email_subscription_status.value
4522
+ if self.feature_list:
4523
+ body["feature_list"] = self.feature_list.as_dict()
4262
4524
  if self.last_updated_timestamp is not None:
4263
4525
  body["last_updated_timestamp"] = self.last_updated_timestamp
4264
4526
  if self.name is not None:
4265
4527
  body["name"] = self.name
4528
+ if self.open_requests:
4529
+ body["open_requests"] = [v.as_dict() for v in self.open_requests]
4266
4530
  if self.permission_level is not None:
4267
4531
  body["permission_level"] = self.permission_level.value
4268
4532
  if self.run_id is not None:
@@ -4292,10 +4556,16 @@ class ModelVersionDatabricks:
4292
4556
  body["current_stage"] = self.current_stage
4293
4557
  if self.description is not None:
4294
4558
  body["description"] = self.description
4559
+ if self.email_subscription_status is not None:
4560
+ body["email_subscription_status"] = self.email_subscription_status
4561
+ if self.feature_list:
4562
+ body["feature_list"] = self.feature_list
4295
4563
  if self.last_updated_timestamp is not None:
4296
4564
  body["last_updated_timestamp"] = self.last_updated_timestamp
4297
4565
  if self.name is not None:
4298
4566
  body["name"] = self.name
4567
+ if self.open_requests:
4568
+ body["open_requests"] = self.open_requests
4299
4569
  if self.permission_level is not None:
4300
4570
  body["permission_level"] = self.permission_level
4301
4571
  if self.run_id is not None:
@@ -4321,10 +4591,13 @@ class ModelVersionDatabricks:
4321
4591
  """Deserializes the ModelVersionDatabricks from a dictionary."""
4322
4592
  return cls(
4323
4593
  creation_timestamp=d.get("creation_timestamp", None),
4324
- current_stage=_enum(d, "current_stage", Stage),
4594
+ current_stage=d.get("current_stage", None),
4325
4595
  description=d.get("description", None),
4596
+ email_subscription_status=_enum(d, "email_subscription_status", RegistryEmailSubscriptionType),
4597
+ feature_list=_from_dict(d, "feature_list", FeatureList),
4326
4598
  last_updated_timestamp=d.get("last_updated_timestamp", None),
4327
4599
  name=d.get("name", None),
4600
+ open_requests=_repeated_dict(d, "open_requests", Activity),
4328
4601
  permission_level=_enum(d, "permission_level", PermissionLevel),
4329
4602
  run_id=d.get("run_id", None),
4330
4603
  run_link=d.get("run_link", None),
@@ -4338,7 +4611,12 @@ class ModelVersionDatabricks:
4338
4611
 
4339
4612
 
4340
4613
  class ModelVersionStatus(Enum):
4341
- """Current status of `model_version`"""
4614
+ """The status of the model version. Valid values are: * `PENDING_REGISTRATION`: Request to register
4615
+ a new model version is pending as server performs background tasks.
4616
+
4617
+ * `FAILED_REGISTRATION`: Request to register a new model version has failed.
4618
+
4619
+ * `READY`: Model version is ready for use."""
4342
4620
 
4343
4621
  FAILED_REGISTRATION = "FAILED_REGISTRATION"
4344
4622
  PENDING_REGISTRATION = "PENDING_REGISTRATION"
@@ -4384,7 +4662,7 @@ class OnlineStore:
4384
4662
  name: str
4385
4663
  """The name of the online store. This is the unique identifier for the online store."""
4386
4664
 
4387
- capacity: Optional[str] = None
4665
+ capacity: str
4388
4666
  """The capacity of the online store. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"."""
4389
4667
 
4390
4668
  creation_time: Optional[str] = None
@@ -4486,6 +4764,7 @@ class PermissionLevel(Enum):
4486
4764
  """Permission level of the requesting user on the object. For what is allowed at each level, see
4487
4765
  [MLflow Model permissions](..)."""
4488
4766
 
4767
+ CAN_CREATE_REGISTERED_MODEL = "CAN_CREATE_REGISTERED_MODEL"
4489
4768
  CAN_EDIT = "CAN_EDIT"
4490
4769
  CAN_MANAGE = "CAN_MANAGE"
4491
4770
  CAN_MANAGE_PRODUCTION_VERSIONS = "CAN_MANAGE_PRODUCTION_VERSIONS"
@@ -4498,9 +4777,8 @@ class PublishSpec:
4498
4777
  online_store: str
4499
4778
  """The name of the target online store."""
4500
4779
 
4501
- online_table_name: Optional[str] = None
4502
- """The full three-part (catalog, schema, table) name of the online table. Auto-generated if not
4503
- specified."""
4780
+ online_table_name: str
4781
+ """The full three-part (catalog, schema, table) name of the online table."""
4504
4782
 
4505
4783
  publish_mode: Optional[PublishSpecPublishMode] = None
4506
4784
  """The publish mode of the pipeline that syncs the online table with the source table. Defaults to
@@ -4617,7 +4895,6 @@ class RegisteredModelAccessControlRequest:
4617
4895
  """name of the group"""
4618
4896
 
4619
4897
  permission_level: Optional[RegisteredModelPermissionLevel] = None
4620
- """Permission level"""
4621
4898
 
4622
4899
  service_principal_name: Optional[str] = None
4623
4900
  """application ID of a service principal"""
@@ -4728,7 +5005,6 @@ class RegisteredModelPermission:
4728
5005
  inherited_from_object: Optional[List[str]] = None
4729
5006
 
4730
5007
  permission_level: Optional[RegisteredModelPermissionLevel] = None
4731
- """Permission level"""
4732
5008
 
4733
5009
  def as_dict(self) -> dict:
4734
5010
  """Serializes the RegisteredModelPermission into a dictionary suitable for use as a JSON request body."""
@@ -4817,7 +5093,6 @@ class RegisteredModelPermissionsDescription:
4817
5093
  description: Optional[str] = None
4818
5094
 
4819
5095
  permission_level: Optional[RegisteredModelPermissionLevel] = None
4820
- """Permission level"""
4821
5096
 
4822
5097
  def as_dict(self) -> dict:
4823
5098
  """Serializes the RegisteredModelPermissionsDescription into a dictionary suitable for use as a JSON request body."""
@@ -4880,6 +5155,18 @@ class RegisteredModelPermissionsRequest:
4880
5155
  )
4881
5156
 
4882
5157
 
5158
+ class RegistryEmailSubscriptionType(Enum):
5159
+ """.. note:: Experimental: This entity may change or be removed in a future release without
5160
+ warning. Email subscription types for registry notifications: - `ALL_EVENTS`: Subscribed to all
5161
+ events. - `DEFAULT`: Default subscription type. - `SUBSCRIBED`: Subscribed to notifications. -
5162
+ `UNSUBSCRIBED`: Not subscribed to notifications."""
5163
+
5164
+ ALL_EVENTS = "ALL_EVENTS"
5165
+ DEFAULT = "DEFAULT"
5166
+ SUBSCRIBED = "SUBSCRIBED"
5167
+ UNSUBSCRIBED = "UNSUBSCRIBED"
5168
+
5169
+
4883
5170
  @dataclass
4884
5171
  class RegistryWebhook:
4885
5172
  creation_timestamp: Optional[int] = None
@@ -4932,13 +5219,6 @@ class RegistryWebhook:
4932
5219
  """Name of the model whose events would trigger this webhook."""
4933
5220
 
4934
5221
  status: Optional[RegistryWebhookStatus] = None
4935
- """Enable or disable triggering the webhook, or put the webhook into test mode. The default is
4936
- `ACTIVE`: * `ACTIVE`: Webhook is triggered when an associated event happens.
4937
-
4938
- * `DISABLED`: Webhook is not triggered.
4939
-
4940
- * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is not triggered on a
4941
- real event."""
4942
5222
 
4943
5223
  def as_dict(self) -> dict:
4944
5224
  """Serializes the RegistryWebhook into a dictionary suitable for use as a JSON request body."""
@@ -5034,13 +5314,15 @@ class RegistryWebhookStatus(Enum):
5034
5314
 
5035
5315
  @dataclass
5036
5316
  class RejectTransitionRequest:
5317
+ """Details required to identify and reject a model version stage transition request."""
5318
+
5037
5319
  name: str
5038
5320
  """Name of the model."""
5039
5321
 
5040
5322
  version: str
5041
5323
  """Version of the model."""
5042
5324
 
5043
- stage: Stage
5325
+ stage: str
5044
5326
  """Target stage of the transition. Valid values are:
5045
5327
 
5046
5328
  * `None`: The initial stage of a model version.
@@ -5062,7 +5344,7 @@ class RejectTransitionRequest:
5062
5344
  if self.name is not None:
5063
5345
  body["name"] = self.name
5064
5346
  if self.stage is not None:
5065
- body["stage"] = self.stage.value
5347
+ body["stage"] = self.stage
5066
5348
  if self.version is not None:
5067
5349
  body["version"] = self.version
5068
5350
  return body
@@ -5086,7 +5368,7 @@ class RejectTransitionRequest:
5086
5368
  return cls(
5087
5369
  comment=d.get("comment", None),
5088
5370
  name=d.get("name", None),
5089
- stage=_enum(d, "stage", Stage),
5371
+ stage=d.get("stage", None),
5090
5372
  version=d.get("version", None),
5091
5373
  )
5092
5374
 
@@ -5094,7 +5376,7 @@ class RejectTransitionRequest:
5094
5376
  @dataclass
5095
5377
  class RejectTransitionRequestResponse:
5096
5378
  activity: Optional[Activity] = None
5097
- """Activity recorded for the action."""
5379
+ """New activity generated as a result of this operation."""
5098
5380
 
5099
5381
  def as_dict(self) -> dict:
5100
5382
  """Serializes the RejectTransitionRequestResponse into a dictionary suitable for use as a JSON request body."""
@@ -6382,23 +6664,6 @@ class SetTagResponse:
6382
6664
  return cls()
6383
6665
 
6384
6666
 
6385
- class Stage(Enum):
6386
- """Stage of the model version. Valid values are:
6387
-
6388
- * `None`: The initial stage of a model version.
6389
-
6390
- * `Staging`: Staging or pre-production stage.
6391
-
6392
- * `Production`: Production stage.
6393
-
6394
- * `Archived`: Archived stage."""
6395
-
6396
- ARCHIVED = "Archived"
6397
- NONE = "None"
6398
- PRODUCTION = "Production"
6399
- STAGING = "Staging"
6400
-
6401
-
6402
6667
  class Status(Enum):
6403
6668
  """The status of the model version. Valid values are: * `PENDING_REGISTRATION`: Request to register
6404
6669
  a new model version is pending as server performs background tasks.
@@ -6412,42 +6677,10 @@ class Status(Enum):
6412
6677
  READY = "READY"
6413
6678
 
6414
6679
 
6415
- @dataclass
6416
- class TestRegistryWebhook:
6417
- """Test webhook response object."""
6418
-
6419
- body: Optional[str] = None
6420
- """Body of the response from the webhook URL"""
6421
-
6422
- status_code: Optional[int] = None
6423
- """Status code returned by the webhook URL"""
6424
-
6425
- def as_dict(self) -> dict:
6426
- """Serializes the TestRegistryWebhook into a dictionary suitable for use as a JSON request body."""
6427
- body = {}
6428
- if self.body is not None:
6429
- body["body"] = self.body
6430
- if self.status_code is not None:
6431
- body["status_code"] = self.status_code
6432
- return body
6433
-
6434
- def as_shallow_dict(self) -> dict:
6435
- """Serializes the TestRegistryWebhook into a shallow dictionary of its immediate attributes."""
6436
- body = {}
6437
- if self.body is not None:
6438
- body["body"] = self.body
6439
- if self.status_code is not None:
6440
- body["status_code"] = self.status_code
6441
- return body
6442
-
6443
- @classmethod
6444
- def from_dict(cls, d: Dict[str, Any]) -> TestRegistryWebhook:
6445
- """Deserializes the TestRegistryWebhook from a dictionary."""
6446
- return cls(body=d.get("body", None), status_code=d.get("status_code", None))
6447
-
6448
-
6449
6680
  @dataclass
6450
6681
  class TestRegistryWebhookRequest:
6682
+ """Details required to test a registry webhook."""
6683
+
6451
6684
  id: str
6452
6685
  """Webhook ID"""
6453
6686
 
@@ -6481,38 +6714,47 @@ class TestRegistryWebhookRequest:
6481
6714
 
6482
6715
  @dataclass
6483
6716
  class TestRegistryWebhookResponse:
6484
- webhook: Optional[TestRegistryWebhook] = None
6485
- """Test webhook response object."""
6717
+ body: Optional[str] = None
6718
+ """Body of the response from the webhook URL"""
6719
+
6720
+ status_code: Optional[int] = None
6721
+ """Status code returned by the webhook URL"""
6486
6722
 
6487
6723
  def as_dict(self) -> dict:
6488
6724
  """Serializes the TestRegistryWebhookResponse into a dictionary suitable for use as a JSON request body."""
6489
6725
  body = {}
6490
- if self.webhook:
6491
- body["webhook"] = self.webhook.as_dict()
6726
+ if self.body is not None:
6727
+ body["body"] = self.body
6728
+ if self.status_code is not None:
6729
+ body["status_code"] = self.status_code
6492
6730
  return body
6493
6731
 
6494
6732
  def as_shallow_dict(self) -> dict:
6495
6733
  """Serializes the TestRegistryWebhookResponse into a shallow dictionary of its immediate attributes."""
6496
6734
  body = {}
6497
- if self.webhook:
6498
- body["webhook"] = self.webhook
6735
+ if self.body is not None:
6736
+ body["body"] = self.body
6737
+ if self.status_code is not None:
6738
+ body["status_code"] = self.status_code
6499
6739
  return body
6500
6740
 
6501
6741
  @classmethod
6502
6742
  def from_dict(cls, d: Dict[str, Any]) -> TestRegistryWebhookResponse:
6503
6743
  """Deserializes the TestRegistryWebhookResponse from a dictionary."""
6504
- return cls(webhook=_from_dict(d, "webhook", TestRegistryWebhook))
6744
+ return cls(body=d.get("body", None), status_code=d.get("status_code", None))
6505
6745
 
6506
6746
 
6507
6747
  @dataclass
6508
6748
  class TransitionModelVersionStageDatabricks:
6749
+ """Details required to transition a model version's stage."""
6750
+
6509
6751
  name: str
6510
6752
  """Name of the model."""
6511
6753
 
6512
6754
  version: str
6513
6755
  """Version of the model."""
6514
6756
 
6515
- stage: Stage
6757
+ stage: str
6516
6758
  """Target stage of the transition. Valid values are:
6517
6759
 
6518
6760
  * `None`: The initial stage of a model version.
@@ -6539,7 +6781,7 @@ class TransitionModelVersionStageDatabricks:
6539
6781
  if self.name is not None:
6540
6782
  body["name"] = self.name
6541
6783
  if self.stage is not None:
6542
- body["stage"] = self.stage.value
6784
+ body["stage"] = self.stage
6543
6785
  if self.version is not None:
6544
6786
  body["version"] = self.version
6545
6787
  return body
@@ -6566,25 +6808,26 @@ class TransitionModelVersionStageDatabricks:
6566
6808
  archive_existing_versions=d.get("archive_existing_versions", None),
6567
6809
  comment=d.get("comment", None),
6568
6810
  name=d.get("name", None),
6569
- stage=_enum(d, "stage", Stage),
6811
+ stage=d.get("stage", None),
6570
6812
  version=d.get("version", None),
6571
6813
  )
6572
6814
 
6573
6815
 
6574
6816
  @dataclass
6575
6817
  class TransitionRequest:
6576
- """Transition request details."""
6818
+ """For activities, this contains the activity recorded for the action. For comments, this contains
6819
+ the comment details. For transition requests, this contains the transition request details."""
6577
6820
 
6578
6821
  available_actions: Optional[List[ActivityAction]] = None
6579
6822
  """Array of actions on the activity allowed for the current viewer."""
6580
6823
 
6581
6824
  comment: Optional[str] = None
6582
- """User-provided comment associated with the transition request."""
6825
+ """User-provided comment associated with the activity, comment, or transition request."""
6583
6826
 
6584
6827
  creation_timestamp: Optional[int] = None
6585
6828
  """Creation time of the object, as a Unix timestamp in milliseconds."""
6586
6829
 
6587
- to_stage: Optional[Stage] = None
6830
+ to_stage: Optional[str] = None
6588
6831
  """Target stage of the transition (if the activity is stage transition related). Valid values are:
6589
6832
 
6590
6833
  * `None`: The initial stage of a model version.
@@ -6608,7 +6851,7 @@ class TransitionRequest:
6608
6851
  if self.creation_timestamp is not None:
6609
6852
  body["creation_timestamp"] = self.creation_timestamp
6610
6853
  if self.to_stage is not None:
6611
- body["to_stage"] = self.to_stage.value
6854
+ body["to_stage"] = self.to_stage
6612
6855
  if self.user_id is not None:
6613
6856
  body["user_id"] = self.user_id
6614
6857
  return body
@@ -6635,37 +6878,40 @@ class TransitionRequest:
6635
6878
  available_actions=_repeated_enum(d, "available_actions", ActivityAction),
6636
6879
  comment=d.get("comment", None),
6637
6880
  creation_timestamp=d.get("creation_timestamp", None),
6638
- to_stage=_enum(d, "to_stage", Stage),
6881
+ to_stage=d.get("to_stage", None),
6639
6882
  user_id=d.get("user_id", None),
6640
6883
  )
6641
6884
 
6642
6885
 
6643
6886
  @dataclass
6644
6887
  class TransitionStageResponse:
6645
- model_version: Optional[ModelVersionDatabricks] = None
6888
+ model_version_databricks: Optional[ModelVersionDatabricks] = None
6889
+ """Updated model version"""
6646
6890
 
6647
6891
  def as_dict(self) -> dict:
6648
6892
  """Serializes the TransitionStageResponse into a dictionary suitable for use as a JSON request body."""
6649
6893
  body = {}
6650
- if self.model_version:
6651
- body["model_version"] = self.model_version.as_dict()
6894
+ if self.model_version_databricks:
6895
+ body["model_version_databricks"] = self.model_version_databricks.as_dict()
6652
6896
  return body
6653
6897
 
6654
6898
  def as_shallow_dict(self) -> dict:
6655
6899
  """Serializes the TransitionStageResponse into a shallow dictionary of its immediate attributes."""
6656
6900
  body = {}
6657
- if self.model_version:
6658
- body["model_version"] = self.model_version
6901
+ if self.model_version_databricks:
6902
+ body["model_version_databricks"] = self.model_version_databricks
6659
6903
  return body
6660
6904
 
6661
6905
  @classmethod
6662
6906
  def from_dict(cls, d: Dict[str, Any]) -> TransitionStageResponse:
6663
6907
  """Deserializes the TransitionStageResponse from a dictionary."""
6664
- return cls(model_version=_from_dict(d, "model_version", ModelVersionDatabricks))
6908
+ return cls(model_version_databricks=_from_dict(d, "model_version_databricks", ModelVersionDatabricks))
6665
6909
 
6666
6910
 
6667
6911
  @dataclass
6668
6912
  class UpdateComment:
6913
+ """Details required to edit a comment on a model version."""
6914
+
6669
6915
  id: str
6670
6916
  """Unique identifier of an activity"""
6671
6917
 
@@ -6699,7 +6945,7 @@ class UpdateComment:
6699
6945
  @dataclass
6700
6946
  class UpdateCommentResponse:
6701
6947
  comment: Optional[CommentObject] = None
6702
- """Comment details."""
6948
+ """Updated comment object"""
6703
6949
 
6704
6950
  def as_dict(self) -> dict:
6705
6951
  """Serializes the UpdateCommentResponse into a dictionary suitable for use as a JSON request body."""
@@ -6805,20 +7051,26 @@ class UpdateModelRequest:
6805
7051
 
6806
7052
  @dataclass
6807
7053
  class UpdateModelResponse:
7054
+ registered_model: Optional[Model] = None
7055
+
6808
7056
  def as_dict(self) -> dict:
6809
7057
  """Serializes the UpdateModelResponse into a dictionary suitable for use as a JSON request body."""
6810
7058
  body = {}
7059
+ if self.registered_model:
7060
+ body["registered_model"] = self.registered_model.as_dict()
6811
7061
  return body
6812
7062
 
6813
7063
  def as_shallow_dict(self) -> dict:
6814
7064
  """Serializes the UpdateModelResponse into a shallow dictionary of its immediate attributes."""
6815
7065
  body = {}
7066
+ if self.registered_model:
7067
+ body["registered_model"] = self.registered_model
6816
7068
  return body
6817
7069
 
6818
7070
  @classmethod
6819
7071
  def from_dict(cls, d: Dict[str, Any]) -> UpdateModelResponse:
6820
7072
  """Deserializes the UpdateModelResponse from a dictionary."""
6821
- return cls()
7073
+ return cls(registered_model=_from_dict(d, "registered_model", Model))
6822
7074
 
6823
7075
 
6824
7076
  @dataclass
@@ -6862,24 +7114,34 @@ class UpdateModelVersionRequest:
6862
7114
 
6863
7115
  @dataclass
6864
7116
  class UpdateModelVersionResponse:
7117
+ model_version: Optional[ModelVersion] = None
7118
+ """Return new version number generated for this model in registry."""
7119
+
6865
7120
  def as_dict(self) -> dict:
6866
7121
  """Serializes the UpdateModelVersionResponse into a dictionary suitable for use as a JSON request body."""
6867
7122
  body = {}
7123
+ if self.model_version:
7124
+ body["model_version"] = self.model_version.as_dict()
6868
7125
  return body
6869
7126
 
6870
7127
  def as_shallow_dict(self) -> dict:
6871
7128
  """Serializes the UpdateModelVersionResponse into a shallow dictionary of its immediate attributes."""
6872
7129
  body = {}
7130
+ if self.model_version:
7131
+ body["model_version"] = self.model_version
6873
7132
  return body
6874
7133
 
6875
7134
  @classmethod
6876
7135
  def from_dict(cls, d: Dict[str, Any]) -> UpdateModelVersionResponse:
6877
7136
  """Deserializes the UpdateModelVersionResponse from a dictionary."""
6878
- return cls()
7137
+ return cls(model_version=_from_dict(d, "model_version", ModelVersion))
6879
7138
 
6880
7139
 
6881
7140
  @dataclass
6882
7141
  class UpdateRegistryWebhook:
7142
+ """Details required to update a registry webhook. Only the fields that need to be updated should be
7143
+ specified, and both `http_url_spec` and `job_spec` should not be specified in the same request."""
7144
+
6883
7145
  id: str
6884
7146
  """Webhook ID"""
6885
7147
 
@@ -6921,13 +7183,6 @@ class UpdateRegistryWebhook:
6921
7183
  job_spec: Optional[JobSpec] = None
6922
7184
 
6923
7185
  status: Optional[RegistryWebhookStatus] = None
6924
- """Enable or disable triggering the webhook, or put the webhook into test mode. The default is
6925
- `ACTIVE`: * `ACTIVE`: Webhook is triggered when an associated event happens.
6926
-
6927
- * `DISABLED`: Webhook is not triggered.
6928
-
6929
- * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is not triggered on a
6930
- real event."""
6931
7186
 
6932
7187
  def as_dict(self) -> dict:
6933
7188
  """Serializes the UpdateRegistryWebhook into a dictionary suitable for use as a JSON request body."""
@@ -7073,20 +7328,26 @@ class UpdateRunStatus(Enum):
7073
7328
 
7074
7329
  @dataclass
7075
7330
  class UpdateWebhookResponse:
7331
+ webhook: Optional[RegistryWebhook] = None
7332
+
7076
7333
  def as_dict(self) -> dict:
7077
7334
  """Serializes the UpdateWebhookResponse into a dictionary suitable for use as a JSON request body."""
7078
7335
  body = {}
7336
+ if self.webhook:
7337
+ body["webhook"] = self.webhook.as_dict()
7079
7338
  return body
7080
7339
 
7081
7340
  def as_shallow_dict(self) -> dict:
7082
7341
  """Serializes the UpdateWebhookResponse into a shallow dictionary of its immediate attributes."""
7083
7342
  body = {}
7343
+ if self.webhook:
7344
+ body["webhook"] = self.webhook
7084
7345
  return body
7085
7346
 
7086
7347
  @classmethod
7087
7348
  def from_dict(cls, d: Dict[str, Any]) -> UpdateWebhookResponse:
7088
7349
  """Deserializes the UpdateWebhookResponse from a dictionary."""
7089
- return cls()
7350
+ return cls(webhook=_from_dict(d, "webhook", RegistryWebhook))
7090
7351
 
7091
7352
 
7092
7353
  class ViewType(Enum):
@@ -8380,7 +8641,7 @@ class FeatureStoreAPI:
8380
8641
  """Create an Online Feature Store.
8381
8642
 
8382
8643
  :param online_store: :class:`OnlineStore`
8383
- An OnlineStore is a logical database instance that stores and serves features online.
8644
+ Online store to create.
8384
8645
 
8385
8646
  :returns: :class:`OnlineStore`
8386
8647
  """
@@ -8484,7 +8745,7 @@ class FeatureStoreAPI:
8484
8745
  :param name: str
8485
8746
  The name of the online store. This is the unique identifier for the online store.
8486
8747
  :param online_store: :class:`OnlineStore`
8487
- An OnlineStore is a logical database instance that stores and serves features online.
8748
+ Online store to update.
8488
8749
  :param update_mask: str
8489
8750
  The list of fields to update.
8490
8751
 
@@ -8728,6 +8989,179 @@ class ForecastingAPI:
8728
8989
  return ForecastingExperiment.from_dict(res)
8729
8990
 
8730
8991
 
8992
+ class MaterializedFeaturesAPI:
8993
+ """Materialized Features are columns in tables and views that can be directly used as features to train and
8994
+ serve ML models."""
8995
+
8996
+ def __init__(self, api_client):
8997
+ self._api = api_client
8998
+
8999
+ def create_feature_tag(self, table_name: str, feature_name: str, feature_tag: FeatureTag) -> FeatureTag:
9000
+ """Creates a FeatureTag.
9001
+
9002
+ :param table_name: str
9003
+ :param feature_name: str
9004
+ :param feature_tag: :class:`FeatureTag`
9005
+
9006
+ :returns: :class:`FeatureTag`
9007
+ """
9008
+ body = feature_tag.as_dict()
9009
+ headers = {
9010
+ "Accept": "application/json",
9011
+ "Content-Type": "application/json",
9012
+ }
9013
+
9014
+ res = self._api.do(
9015
+ "POST",
9016
+ f"/api/2.0/feature-store/feature-tables/{table_name}/features/{feature_name}/tags",
9017
+ body=body,
9018
+ headers=headers,
9019
+ )
9020
+ return FeatureTag.from_dict(res)
9021
+
9022
+ def delete_feature_tag(self, table_name: str, feature_name: str, key: str):
9023
+ """Deletes a FeatureTag.
9024
+
9025
+ :param table_name: str
9026
+ The name of the feature table.
9027
+ :param feature_name: str
9028
+ The name of the feature within the feature table.
9029
+ :param key: str
9030
+ The key of the tag to delete.
9031
+
9032
+
9033
+ """
9034
+
9035
+ headers = {
9036
+ "Accept": "application/json",
9037
+ }
9038
+
9039
+ self._api.do(
9040
+ "DELETE",
9041
+ f"/api/2.0/feature-store/feature-tables/{table_name}/features/{feature_name}/tags/{key}",
9042
+ headers=headers,
9043
+ )
9044
+
9045
+ def get_feature_lineage(self, table_name: str, feature_name: str) -> FeatureLineage:
9046
+ """Get Feature Lineage.
9047
+
9048
+ :param table_name: str
9049
+ The full name of the feature table in Unity Catalog.
9050
+ :param feature_name: str
9051
+ The name of the feature.
9052
+
9053
+ :returns: :class:`FeatureLineage`
9054
+ """
9055
+
9056
+ headers = {
9057
+ "Accept": "application/json",
9058
+ }
9059
+
9060
+ res = self._api.do(
9061
+ "GET",
9062
+ f"/api/2.0/feature-store/feature-tables/{table_name}/features/{feature_name}/lineage",
9063
+ headers=headers,
9064
+ )
9065
+ return FeatureLineage.from_dict(res)
9066
+
9067
+ def get_feature_tag(self, table_name: str, feature_name: str, key: str) -> FeatureTag:
9068
+ """Gets a FeatureTag.
9069
+
9070
+ :param table_name: str
9071
+ :param feature_name: str
9072
+ :param key: str
9073
+
9074
+ :returns: :class:`FeatureTag`
9075
+ """
9076
+
9077
+ headers = {
9078
+ "Accept": "application/json",
9079
+ }
9080
+
9081
+ res = self._api.do(
9082
+ "GET",
9083
+ f"/api/2.0/feature-store/feature-tables/{table_name}/features/{feature_name}/tags/{key}",
9084
+ headers=headers,
9085
+ )
9086
+ return FeatureTag.from_dict(res)
9087
+
9088
+ def list_feature_tags(
9089
+ self, table_name: str, feature_name: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
9090
+ ) -> Iterator[FeatureTag]:
9091
+ """Lists FeatureTags.
9092
+
9093
+ :param table_name: str
9094
+ :param feature_name: str
9095
+ :param page_size: int (optional)
9096
+ The maximum number of results to return.
9097
+ :param page_token: str (optional)
9098
+ Pagination token to go to the next page based on a previous query.
9099
+
9100
+ :returns: Iterator over :class:`FeatureTag`
9101
+ """
9102
+
9103
+ query = {}
9104
+ if page_size is not None:
9105
+ query["page_size"] = page_size
9106
+ if page_token is not None:
9107
+ query["page_token"] = page_token
9108
+ headers = {
9109
+ "Accept": "application/json",
9110
+ }
9111
+
9112
+ while True:
9113
+ json = self._api.do(
9114
+ "GET",
9115
+ f"/api/2.0/feature-store/feature-tables/{table_name}/features/{feature_name}/tags",
9116
+ query=query,
9117
+ headers=headers,
9118
+ )
9119
+ if "feature_tags" in json:
9120
+ for v in json["feature_tags"]:
9121
+ yield FeatureTag.from_dict(v)
9122
+ if "next_page_token" not in json or not json["next_page_token"]:
9123
+ return
9124
+ query["page_token"] = json["next_page_token"]
9125
+
9126
+ def update_feature_tag(
9127
+ self,
9128
+ table_name: str,
9129
+ feature_name: str,
9130
+ key: str,
9131
+ feature_tag: FeatureTag,
9132
+ *,
9133
+ update_mask: Optional[str] = None,
9134
+ ) -> FeatureTag:
9135
+ """Updates a FeatureTag.
9136
+
9137
+ :param table_name: str
9138
+ :param feature_name: str
9139
+ :param key: str
9140
+ :param feature_tag: :class:`FeatureTag`
9141
+ :param update_mask: str (optional)
9142
+ The list of fields to update.
9143
+
9144
+ :returns: :class:`FeatureTag`
9145
+ """
9146
+ body = feature_tag.as_dict()
9147
+ query = {}
9148
+ if update_mask is not None:
9149
+ query["update_mask"] = update_mask
9150
+ headers = {
9151
+ "Accept": "application/json",
9152
+ "Content-Type": "application/json",
9153
+ }
9154
+
9155
+ res = self._api.do(
9156
+ "PATCH",
9157
+ f"/api/2.0/feature-store/feature-tables/{table_name}/features/{feature_name}/tags/{key}",
9158
+ query=query,
9159
+ body=body,
9160
+ headers=headers,
9161
+ )
9162
+ return FeatureTag.from_dict(res)
9163
+
9164
+
8731
9165
  class ModelRegistryAPI:
8732
9166
  """Note: This API reference documents APIs for the Workspace Model Registry. Databricks recommends using
8733
9167
  [Models in Unity Catalog](/api/workspace/registeredmodels) instead. Models in Unity Catalog provides
@@ -8741,7 +9175,7 @@ class ModelRegistryAPI:
8741
9175
  self._api = api_client
8742
9176
 
8743
9177
  def approve_transition_request(
8744
- self, name: str, version: str, stage: Stage, archive_existing_versions: bool, *, comment: Optional[str] = None
9178
+ self, name: str, version: str, stage: str, archive_existing_versions: bool, *, comment: Optional[str] = None
8745
9179
  ) -> ApproveTransitionRequestResponse:
8746
9180
  """Approves a model version stage transition request.
8747
9181
 
@@ -8749,7 +9183,7 @@ class ModelRegistryAPI:
8749
9183
  Name of the model.
8750
9184
  :param version: str
8751
9185
  Version of the model.
8752
- :param stage: :class:`Stage`
9186
+ :param stage: str
8753
9187
  Target stage of the transition. Valid values are:
8754
9188
 
8755
9189
  * `None`: The initial stage of a model version.
@@ -8774,7 +9208,7 @@ class ModelRegistryAPI:
8774
9208
  if name is not None:
8775
9209
  body["name"] = name
8776
9210
  if stage is not None:
8777
- body["stage"] = stage.value
9211
+ body["stage"] = stage
8778
9212
  if version is not None:
8779
9213
  body["version"] = version
8780
9214
  headers = {
@@ -8816,9 +9250,8 @@ class ModelRegistryAPI:
8816
9250
  def create_model(
8817
9251
  self, name: str, *, description: Optional[str] = None, tags: Optional[List[ModelTag]] = None
8818
9252
  ) -> CreateModelResponse:
8819
- """Creates a new registered model with the name specified in the request body.
8820
-
8821
- Throws `RESOURCE_ALREADY_EXISTS` if a registered model with the given name exists.
9253
+ """Creates a new registered model with the name specified in the request body. Throws
9254
+ `RESOURCE_ALREADY_EXISTS` if a registered model with the given name exists.
8822
9255
 
8823
9256
  :param name: str
8824
9257
  Register models under this name
@@ -8895,7 +9328,7 @@ class ModelRegistryAPI:
8895
9328
  return CreateModelVersionResponse.from_dict(res)
8896
9329
 
8897
9330
  def create_transition_request(
8898
- self, name: str, version: str, stage: Stage, *, comment: Optional[str] = None
9331
+ self, name: str, version: str, stage: str, *, comment: Optional[str] = None
8899
9332
  ) -> CreateTransitionRequestResponse:
8900
9333
  """Creates a model version stage transition request.
8901
9334
 
@@ -8903,7 +9336,7 @@ class ModelRegistryAPI:
8903
9336
  Name of the model.
8904
9337
  :param version: str
8905
9338
  Version of the model.
8906
- :param stage: :class:`Stage`
9339
+ :param stage: str
8907
9340
  Target stage of the transition. Valid values are:
8908
9341
 
8909
9342
  * `None`: The initial stage of a model version.
@@ -8924,7 +9357,7 @@ class ModelRegistryAPI:
8924
9357
  if name is not None:
8925
9358
  body["name"] = name
8926
9359
  if stage is not None:
8927
- body["stage"] = stage.value
9360
+ body["stage"] = stage
8928
9361
  if version is not None:
8929
9362
  body["version"] = version
8930
9363
  headers = {
@@ -8945,9 +9378,7 @@ class ModelRegistryAPI:
8945
9378
  model_name: Optional[str] = None,
8946
9379
  status: Optional[RegistryWebhookStatus] = None,
8947
9380
  ) -> CreateWebhookResponse:
8948
- """**NOTE**: This endpoint is in Public Preview.
8949
-
8950
- Creates a registry webhook.
9381
+ """**NOTE:** This endpoint is in Public Preview. Creates a registry webhook.
8951
9382
 
8952
9383
  :param events: List[:class:`RegistryWebhookEvent`]
8953
9384
  Events that can trigger a registry webhook: * `MODEL_VERSION_CREATED`: A new model version was
@@ -8981,7 +9412,9 @@ class ModelRegistryAPI:
8981
9412
  :param description: str (optional)
8982
9413
  User-specified description for the webhook.
8983
9414
  :param http_url_spec: :class:`HttpUrlSpec` (optional)
9415
+ External HTTPS URL called on event trigger (by using a POST request).
8984
9416
  :param job_spec: :class:`JobSpec` (optional)
9417
+ ID of the job that the webhook runs.
8985
9418
  :param model_name: str (optional)
8986
9419
  If model name is not specified, a registry-wide webhook is created that listens for the specified
8987
9420
  events across all versions of all registered models.
@@ -9126,21 +9559,15 @@ class ModelRegistryAPI:
9126
9559
  self._api.do("DELETE", "/api/2.0/mlflow/model-versions/delete-tag", query=query, headers=headers)
9127
9560
 
9128
9561
  def delete_transition_request(
9129
- self,
9130
- name: str,
9131
- version: str,
9132
- stage: DeleteTransitionRequestStage,
9133
- creator: str,
9134
- *,
9135
- comment: Optional[str] = None,
9136
- ):
9562
+ self, name: str, version: str, stage: str, creator: str, *, comment: Optional[str] = None
9563
+ ) -> DeleteTransitionRequestResponse:
9137
9564
  """Cancels a model version stage transition request.
9138
9565
 
9139
9566
  :param name: str
9140
9567
  Name of the model.
9141
9568
  :param version: str
9142
9569
  Version of the model.
9143
- :param stage: :class:`DeleteTransitionRequestStage`
9570
+ :param stage: str
9144
9571
  Target stage of the transition request. Valid values are:
9145
9572
 
9146
9573
  * `None`: The initial stage of a model version.
@@ -9156,7 +9583,7 @@ class ModelRegistryAPI:
9156
9583
  :param comment: str (optional)
9157
9584
  User-provided comment on the action.
9158
9585
 
9159
-
9586
+ :returns: :class:`DeleteTransitionRequestResponse`
9160
9587
  """
9161
9588
 
9162
9589
  query = {}
@@ -9167,21 +9594,20 @@ class ModelRegistryAPI:
9167
9594
  if name is not None:
9168
9595
  query["name"] = name
9169
9596
  if stage is not None:
9170
- query["stage"] = stage.value
9597
+ query["stage"] = stage
9171
9598
  if version is not None:
9172
9599
  query["version"] = version
9173
9600
  headers = {
9174
9601
  "Accept": "application/json",
9175
9602
  }
9176
9603
 
9177
- self._api.do("DELETE", "/api/2.0/mlflow/transition-requests/delete", query=query, headers=headers)
9604
+ res = self._api.do("DELETE", "/api/2.0/mlflow/transition-requests/delete", query=query, headers=headers)
9605
+ return DeleteTransitionRequestResponse.from_dict(res)
9178
9606
 
9179
- def delete_webhook(self, *, id: Optional[str] = None):
9180
- """**NOTE:** This endpoint is in Public Preview.
9607
+ def delete_webhook(self, id: str):
9608
+ """**NOTE:** This endpoint is in Public Preview. Deletes a registry webhook.
9181
9609
 
9182
- Deletes a registry webhook.
9183
-
9184
- :param id: str (optional)
9610
+ :param id: str
9185
9611
  Webhook ID required to delete a registry webhook.
9186
9612
 
9187
9613
 
@@ -9357,7 +9783,7 @@ class ModelRegistryAPI:
9357
9783
  """Gets a list of all open stage transition requests for the model version.
9358
9784
 
9359
9785
  :param name: str
9360
- Name of the model.
9786
+ Name of the registered model.
9361
9787
  :param version: str
9362
9788
  Version of the model.
9363
9789
 
@@ -9381,19 +9807,48 @@ class ModelRegistryAPI:
9381
9807
  self,
9382
9808
  *,
9383
9809
  events: Optional[List[RegistryWebhookEvent]] = None,
9810
+ max_results: Optional[int] = None,
9384
9811
  model_name: Optional[str] = None,
9385
9812
  page_token: Optional[str] = None,
9386
9813
  ) -> Iterator[RegistryWebhook]:
9387
- """**NOTE:** This endpoint is in Public Preview.
9388
-
9389
- Lists all registry webhooks.
9814
+ """**NOTE:** This endpoint is in Public Preview. Lists all registry webhooks.
9390
9815
 
9391
9816
  :param events: List[:class:`RegistryWebhookEvent`] (optional)
9817
+ Events that trigger the webhook. * `MODEL_VERSION_CREATED`: A new model version was created for the
9818
+ associated model.
9819
+
9820
+ * `MODEL_VERSION_TRANSITIONED_STAGE`: A model version’s stage was changed.
9821
+
9822
+ * `TRANSITION_REQUEST_CREATED`: A user requested a model version’s stage be transitioned.
9823
+
9824
+ * `COMMENT_CREATED`: A user wrote a comment on a registered model.
9825
+
9826
+ * `REGISTERED_MODEL_CREATED`: A new registered model was created. This event type can only be
9827
+ specified for a registry-wide webhook, which can be created by not specifying a model name in the
9828
+ create request.
9829
+
9830
+ * `MODEL_VERSION_TAG_SET`: A user set a tag on the model version.
9831
+
9832
+ * `MODEL_VERSION_TRANSITIONED_TO_STAGING`: A model version was transitioned to staging.
9833
+
9834
+ * `MODEL_VERSION_TRANSITIONED_TO_PRODUCTION`: A model version was transitioned to production.
9835
+
9836
+ * `MODEL_VERSION_TRANSITIONED_TO_ARCHIVED`: A model version was archived.
9837
+
9838
+ * `TRANSITION_REQUEST_TO_STAGING_CREATED`: A user requested a model version be transitioned to
9839
+ staging.
9840
+
9841
+ * `TRANSITION_REQUEST_TO_PRODUCTION_CREATED`: A user requested a model version be transitioned to
9842
+ production.
9843
+
9844
+ * `TRANSITION_REQUEST_TO_ARCHIVED_CREATED`: A user requested a model version be archived.
9845
+
9392
9846
  If `events` is specified, any webhook with one or more of the specified trigger events is included
9393
9847
  in the output. If `events` is not specified, webhooks of all event types are included in the output.
9848
+ :param max_results: int (optional)
9394
9849
  :param model_name: str (optional)
9395
- If not specified, all webhooks associated with the specified events are listed, regardless of their
9396
- associated model.
9850
+ Registered model name If not specified, all webhooks associated with the specified events are
9851
+ listed, regardless of their associated model.
9397
9852
  :param page_token: str (optional)
9398
9853
  Token indicating the page of artifact results to fetch
9399
9854
 
@@ -9403,6 +9858,8 @@ class ModelRegistryAPI:
9403
9858
  query = {}
9404
9859
  if events is not None:
9405
9860
  query["events"] = [v.value for v in events]
9861
+ if max_results is not None:
9862
+ query["max_results"] = max_results
9406
9863
  if model_name is not None:
9407
9864
  query["model_name"] = model_name
9408
9865
  if page_token is not None:
@@ -9421,7 +9878,7 @@ class ModelRegistryAPI:
9421
9878
  query["page_token"] = json["next_page_token"]
9422
9879
 
9423
9880
  def reject_transition_request(
9424
- self, name: str, version: str, stage: Stage, *, comment: Optional[str] = None
9881
+ self, name: str, version: str, stage: str, *, comment: Optional[str] = None
9425
9882
  ) -> RejectTransitionRequestResponse:
9426
9883
  """Rejects a model version stage transition request.
9427
9884
 
@@ -9429,7 +9886,7 @@ class ModelRegistryAPI:
9429
9886
  Name of the model.
9430
9887
  :param version: str
9431
9888
  Version of the model.
9432
- :param stage: :class:`Stage`
9889
+ :param stage: str
9433
9890
  Target stage of the transition. Valid values are:
9434
9891
 
9435
9892
  * `None`: The initial stage of a model version.
@@ -9450,7 +9907,7 @@ class ModelRegistryAPI:
9450
9907
  if name is not None:
9451
9908
  body["name"] = name
9452
9909
  if stage is not None:
9453
- body["stage"] = stage.value
9910
+ body["stage"] = stage
9454
9911
  if version is not None:
9455
9912
  body["version"] = version
9456
9913
  headers = {
@@ -9672,9 +10129,7 @@ class ModelRegistryAPI:
9672
10129
  def test_registry_webhook(
9673
10130
  self, id: str, *, event: Optional[RegistryWebhookEvent] = None
9674
10131
  ) -> TestRegistryWebhookResponse:
9675
- """**NOTE:** This endpoint is in Public Preview.
9676
-
9677
- Tests a registry webhook.
10132
+ """**NOTE:** This endpoint is in Public Preview. Tests a registry webhook.
9678
10133
 
9679
10134
  :param id: str
9680
10135
  Webhook ID
@@ -9698,10 +10153,10 @@ class ModelRegistryAPI:
9698
10153
  return TestRegistryWebhookResponse.from_dict(res)
9699
10154
 
9700
10155
  def transition_stage(
9701
- self, name: str, version: str, stage: Stage, archive_existing_versions: bool, *, comment: Optional[str] = None
10156
+ self, name: str, version: str, stage: str, archive_existing_versions: bool, *, comment: Optional[str] = None
9702
10157
  ) -> TransitionStageResponse:
9703
10158
  """Transition a model version's stage. This is a Databricks workspace version of the [MLflow endpoint]
9704
- that also accepts a comment associated with the transition to be recorded.",
10159
+ that also accepts a comment associated with the transition to be recorded.
9705
10160
 
9706
10161
  [MLflow endpoint]: https://www.mlflow.org/docs/latest/rest-api.html#transition-modelversion-stage
9707
10162
 
@@ -9709,7 +10164,7 @@ class ModelRegistryAPI:
9709
10164
  Name of the model.
9710
10165
  :param version: str
9711
10166
  Version of the model.
9712
- :param stage: :class:`Stage`
10167
+ :param stage: str
9713
10168
  Target stage of the transition. Valid values are:
9714
10169
 
9715
10170
  * `None`: The initial stage of a model version.
@@ -9734,7 +10189,7 @@ class ModelRegistryAPI:
9734
10189
  if name is not None:
9735
10190
  body["name"] = name
9736
10191
  if stage is not None:
9737
- body["stage"] = stage.value
10192
+ body["stage"] = stage
9738
10193
  if version is not None:
9739
10194
  body["version"] = version
9740
10195
  headers = {
@@ -9770,7 +10225,7 @@ class ModelRegistryAPI:
9770
10225
  res = self._api.do("PATCH", "/api/2.0/mlflow/comments/update", body=body, headers=headers)
9771
10226
  return UpdateCommentResponse.from_dict(res)
9772
10227
 
9773
- def update_model(self, name: str, *, description: Optional[str] = None):
10228
+ def update_model(self, name: str, *, description: Optional[str] = None) -> UpdateModelResponse:
9774
10229
  """Updates a registered model.
9775
10230
 
9776
10231
  :param name: str
@@ -9778,7 +10233,7 @@ class ModelRegistryAPI:
9778
10233
  :param description: str (optional)
9779
10234
  If provided, updates the description for this `registered_model`.
9780
10235
 
9781
-
10236
+ :returns: :class:`UpdateModelResponse`
9782
10237
  """
9783
10238
  body = {}
9784
10239
  if description is not None:
@@ -9790,9 +10245,12 @@ class ModelRegistryAPI:
9790
10245
  "Content-Type": "application/json",
9791
10246
  }
9792
10247
 
9793
- self._api.do("PATCH", "/api/2.0/mlflow/registered-models/update", body=body, headers=headers)
10248
+ res = self._api.do("PATCH", "/api/2.0/mlflow/registered-models/update", body=body, headers=headers)
10249
+ return UpdateModelResponse.from_dict(res)
9794
10250
 
9795
- def update_model_version(self, name: str, version: str, *, description: Optional[str] = None):
10251
+ def update_model_version(
10252
+ self, name: str, version: str, *, description: Optional[str] = None
10253
+ ) -> UpdateModelVersionResponse:
9796
10254
  """Updates the model version.
9797
10255
 
9798
10256
  :param name: str
@@ -9802,7 +10260,7 @@ class ModelRegistryAPI:
9802
10260
  :param description: str (optional)
9803
10261
  If provided, updates the description for this `registered_model`.
9804
10262
 
9805
-
10263
+ :returns: :class:`UpdateModelVersionResponse`
9806
10264
  """
9807
10265
  body = {}
9808
10266
  if description is not None:
@@ -9816,7 +10274,8 @@ class ModelRegistryAPI:
9816
10274
  "Content-Type": "application/json",
9817
10275
  }
9818
10276
 
9819
- self._api.do("PATCH", "/api/2.0/mlflow/model-versions/update", body=body, headers=headers)
10277
+ res = self._api.do("PATCH", "/api/2.0/mlflow/model-versions/update", body=body, headers=headers)
10278
+ return UpdateModelVersionResponse.from_dict(res)
9820
10279
 
9821
10280
  def update_permissions(
9822
10281
  self,
@@ -9855,10 +10314,8 @@ class ModelRegistryAPI:
9855
10314
  http_url_spec: Optional[HttpUrlSpec] = None,
9856
10315
  job_spec: Optional[JobSpec] = None,
9857
10316
  status: Optional[RegistryWebhookStatus] = None,
9858
- ):
9859
- """**NOTE:** This endpoint is in Public Preview.
9860
-
9861
- Updates a registry webhook.
10317
+ ) -> UpdateWebhookResponse:
10318
+ """**NOTE:** This endpoint is in Public Preview. Updates a registry webhook.
9862
10319
 
9863
10320
  :param id: str
9864
10321
  Webhook ID
@@ -9896,15 +10353,8 @@ class ModelRegistryAPI:
9896
10353
  :param http_url_spec: :class:`HttpUrlSpec` (optional)
9897
10354
  :param job_spec: :class:`JobSpec` (optional)
9898
10355
  :param status: :class:`RegistryWebhookStatus` (optional)
9899
- Enable or disable triggering the webhook, or put the webhook into test mode. The default is
9900
- `ACTIVE`: * `ACTIVE`: Webhook is triggered when an associated event happens.
9901
-
9902
- * `DISABLED`: Webhook is not triggered.
9903
-
9904
- * `TEST_MODE`: Webhook can be triggered through the test endpoint, but is not triggered on a real
9905
- event.
9906
-
9907
10356
 
10357
+ :returns: :class:`UpdateWebhookResponse`
9908
10358
  """
9909
10359
  body = {}
9910
10360
  if description is not None:
@@ -9924,4 +10374,5 @@ class ModelRegistryAPI:
9924
10374
  "Content-Type": "application/json",
9925
10375
  }
9926
10376
 
9927
- self._api.do("PATCH", "/api/2.0/mlflow/registry-webhooks/update", body=body, headers=headers)
10377
+ res = self._api.do("PATCH", "/api/2.0/mlflow/registry-webhooks/update", body=body, headers=headers)
10378
+ return UpdateWebhookResponse.from_dict(res)