databricks-sdk 0.19.0__py3-none-any.whl → 0.20.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.
- databricks/sdk/__init__.py +16 -2
- databricks/sdk/casing.py +38 -0
- databricks/sdk/config.py +5 -0
- databricks/sdk/core.py +27 -14
- databricks/sdk/mixins/workspace.py +2 -1
- databricks/sdk/service/billing.py +22 -1
- databricks/sdk/service/catalog.py +557 -46
- databricks/sdk/service/compute.py +57 -0
- databricks/sdk/service/dashboards.py +1 -0
- databricks/sdk/service/files.py +147 -15
- databricks/sdk/service/iam.py +53 -0
- databricks/sdk/service/jobs.py +147 -135
- databricks/sdk/service/ml.py +57 -0
- databricks/sdk/service/oauth2.py +13 -0
- databricks/sdk/service/pipelines.py +12 -0
- databricks/sdk/service/provisioning.py +30 -0
- databricks/sdk/service/serving.py +73 -35
- databricks/sdk/service/settings.py +41 -0
- databricks/sdk/service/sharing.py +38 -18
- databricks/sdk/service/sql.py +92 -2
- databricks/sdk/service/vectorsearch.py +10 -0
- databricks/sdk/service/workspace.py +34 -0
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.19.0.dist-info → databricks_sdk-0.20.0.dist-info}/METADATA +1 -1
- databricks_sdk-0.20.0.dist-info/RECORD +54 -0
- databricks_sdk-0.19.0.dist-info/RECORD +0 -53
- {databricks_sdk-0.19.0.dist-info → databricks_sdk-0.20.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.19.0.dist-info → databricks_sdk-0.20.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.19.0.dist-info → databricks_sdk-0.20.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.19.0.dist-info → databricks_sdk-0.20.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/ml.py
CHANGED
|
@@ -3517,6 +3517,7 @@ class ExperimentsAPI:
|
|
|
3517
3517
|
if name is not None: body['name'] = name
|
|
3518
3518
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
3519
3519
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3520
|
+
|
|
3520
3521
|
res = self._api.do('POST', '/api/2.0/mlflow/experiments/create', body=body, headers=headers)
|
|
3521
3522
|
return CreateExperimentResponse.from_dict(res)
|
|
3522
3523
|
|
|
@@ -3550,6 +3551,7 @@ class ExperimentsAPI:
|
|
|
3550
3551
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
3551
3552
|
if user_id is not None: body['user_id'] = user_id
|
|
3552
3553
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3554
|
+
|
|
3553
3555
|
res = self._api.do('POST', '/api/2.0/mlflow/runs/create', body=body, headers=headers)
|
|
3554
3556
|
return CreateRunResponse.from_dict(res)
|
|
3555
3557
|
|
|
@@ -3567,6 +3569,7 @@ class ExperimentsAPI:
|
|
|
3567
3569
|
body = {}
|
|
3568
3570
|
if experiment_id is not None: body['experiment_id'] = experiment_id
|
|
3569
3571
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3572
|
+
|
|
3570
3573
|
self._api.do('POST', '/api/2.0/mlflow/experiments/delete', body=body, headers=headers)
|
|
3571
3574
|
|
|
3572
3575
|
def delete_run(self, run_id: str):
|
|
@@ -3582,6 +3585,7 @@ class ExperimentsAPI:
|
|
|
3582
3585
|
body = {}
|
|
3583
3586
|
if run_id is not None: body['run_id'] = run_id
|
|
3584
3587
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3588
|
+
|
|
3585
3589
|
self._api.do('POST', '/api/2.0/mlflow/runs/delete', body=body, headers=headers)
|
|
3586
3590
|
|
|
3587
3591
|
def delete_runs(self,
|
|
@@ -3611,6 +3615,7 @@ class ExperimentsAPI:
|
|
|
3611
3615
|
if max_runs is not None: body['max_runs'] = max_runs
|
|
3612
3616
|
if max_timestamp_millis is not None: body['max_timestamp_millis'] = max_timestamp_millis
|
|
3613
3617
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3618
|
+
|
|
3614
3619
|
res = self._api.do('POST', '/api/2.0/mlflow/databricks/runs/delete-runs', body=body, headers=headers)
|
|
3615
3620
|
return DeleteRunsResponse.from_dict(res)
|
|
3616
3621
|
|
|
@@ -3631,6 +3636,7 @@ class ExperimentsAPI:
|
|
|
3631
3636
|
if key is not None: body['key'] = key
|
|
3632
3637
|
if run_id is not None: body['run_id'] = run_id
|
|
3633
3638
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3639
|
+
|
|
3634
3640
|
self._api.do('POST', '/api/2.0/mlflow/runs/delete-tag', body=body, headers=headers)
|
|
3635
3641
|
|
|
3636
3642
|
def get_by_name(self, experiment_name: str) -> GetExperimentResponse:
|
|
@@ -3653,6 +3659,7 @@ class ExperimentsAPI:
|
|
|
3653
3659
|
query = {}
|
|
3654
3660
|
if experiment_name is not None: query['experiment_name'] = experiment_name
|
|
3655
3661
|
headers = {'Accept': 'application/json', }
|
|
3662
|
+
|
|
3656
3663
|
res = self._api.do('GET', '/api/2.0/mlflow/experiments/get-by-name', query=query, headers=headers)
|
|
3657
3664
|
return GetExperimentResponse.from_dict(res)
|
|
3658
3665
|
|
|
@@ -3670,6 +3677,7 @@ class ExperimentsAPI:
|
|
|
3670
3677
|
query = {}
|
|
3671
3678
|
if experiment_id is not None: query['experiment_id'] = experiment_id
|
|
3672
3679
|
headers = {'Accept': 'application/json', }
|
|
3680
|
+
|
|
3673
3681
|
res = self._api.do('GET', '/api/2.0/mlflow/experiments/get', query=query, headers=headers)
|
|
3674
3682
|
return GetExperimentResponse.from_dict(res)
|
|
3675
3683
|
|
|
@@ -3729,6 +3737,7 @@ class ExperimentsAPI:
|
|
|
3729
3737
|
"""
|
|
3730
3738
|
|
|
3731
3739
|
headers = {'Accept': 'application/json', }
|
|
3740
|
+
|
|
3732
3741
|
res = self._api.do('GET',
|
|
3733
3742
|
f'/api/2.0/permissions/experiments/{experiment_id}/permissionLevels',
|
|
3734
3743
|
headers=headers)
|
|
@@ -3746,6 +3755,7 @@ class ExperimentsAPI:
|
|
|
3746
3755
|
"""
|
|
3747
3756
|
|
|
3748
3757
|
headers = {'Accept': 'application/json', }
|
|
3758
|
+
|
|
3749
3759
|
res = self._api.do('GET', f'/api/2.0/permissions/experiments/{experiment_id}', headers=headers)
|
|
3750
3760
|
return ExperimentPermissions.from_dict(res)
|
|
3751
3761
|
|
|
@@ -3770,6 +3780,7 @@ class ExperimentsAPI:
|
|
|
3770
3780
|
if run_id is not None: query['run_id'] = run_id
|
|
3771
3781
|
if run_uuid is not None: query['run_uuid'] = run_uuid
|
|
3772
3782
|
headers = {'Accept': 'application/json', }
|
|
3783
|
+
|
|
3773
3784
|
res = self._api.do('GET', '/api/2.0/mlflow/runs/get', query=query, headers=headers)
|
|
3774
3785
|
return GetRunResponse.from_dict(res)
|
|
3775
3786
|
|
|
@@ -3912,6 +3923,7 @@ class ExperimentsAPI:
|
|
|
3912
3923
|
if run_id is not None: body['run_id'] = run_id
|
|
3913
3924
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
3914
3925
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3926
|
+
|
|
3915
3927
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-batch', body=body, headers=headers)
|
|
3916
3928
|
|
|
3917
3929
|
def log_inputs(self, *, datasets: Optional[List[DatasetInput]] = None, run_id: Optional[str] = None):
|
|
@@ -3930,6 +3942,7 @@ class ExperimentsAPI:
|
|
|
3930
3942
|
if datasets is not None: body['datasets'] = [v.as_dict() for v in datasets]
|
|
3931
3943
|
if run_id is not None: body['run_id'] = run_id
|
|
3932
3944
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3945
|
+
|
|
3933
3946
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-inputs', body=body, headers=headers)
|
|
3934
3947
|
|
|
3935
3948
|
def log_metric(self,
|
|
@@ -3970,6 +3983,7 @@ class ExperimentsAPI:
|
|
|
3970
3983
|
if timestamp is not None: body['timestamp'] = timestamp
|
|
3971
3984
|
if value is not None: body['value'] = value
|
|
3972
3985
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3986
|
+
|
|
3973
3987
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-metric', body=body, headers=headers)
|
|
3974
3988
|
|
|
3975
3989
|
def log_model(self, *, model_json: Optional[str] = None, run_id: Optional[str] = None):
|
|
@@ -3988,6 +4002,7 @@ class ExperimentsAPI:
|
|
|
3988
4002
|
if model_json is not None: body['model_json'] = model_json
|
|
3989
4003
|
if run_id is not None: body['run_id'] = run_id
|
|
3990
4004
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4005
|
+
|
|
3991
4006
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-model', body=body, headers=headers)
|
|
3992
4007
|
|
|
3993
4008
|
def log_param(self,
|
|
@@ -4020,6 +4035,7 @@ class ExperimentsAPI:
|
|
|
4020
4035
|
if run_uuid is not None: body['run_uuid'] = run_uuid
|
|
4021
4036
|
if value is not None: body['value'] = value
|
|
4022
4037
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4038
|
+
|
|
4023
4039
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-parameter', body=body, headers=headers)
|
|
4024
4040
|
|
|
4025
4041
|
def restore_experiment(self, experiment_id: str):
|
|
@@ -4039,6 +4055,7 @@ class ExperimentsAPI:
|
|
|
4039
4055
|
body = {}
|
|
4040
4056
|
if experiment_id is not None: body['experiment_id'] = experiment_id
|
|
4041
4057
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4058
|
+
|
|
4042
4059
|
self._api.do('POST', '/api/2.0/mlflow/experiments/restore', body=body, headers=headers)
|
|
4043
4060
|
|
|
4044
4061
|
def restore_run(self, run_id: str):
|
|
@@ -4054,6 +4071,7 @@ class ExperimentsAPI:
|
|
|
4054
4071
|
body = {}
|
|
4055
4072
|
if run_id is not None: body['run_id'] = run_id
|
|
4056
4073
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4074
|
+
|
|
4057
4075
|
self._api.do('POST', '/api/2.0/mlflow/runs/restore', body=body, headers=headers)
|
|
4058
4076
|
|
|
4059
4077
|
def restore_runs(self,
|
|
@@ -4083,6 +4101,7 @@ class ExperimentsAPI:
|
|
|
4083
4101
|
if max_runs is not None: body['max_runs'] = max_runs
|
|
4084
4102
|
if min_timestamp_millis is not None: body['min_timestamp_millis'] = min_timestamp_millis
|
|
4085
4103
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4104
|
+
|
|
4086
4105
|
res = self._api.do('POST', '/api/2.0/mlflow/databricks/runs/restore-runs', body=body, headers=headers)
|
|
4087
4106
|
return RestoreRunsResponse.from_dict(res)
|
|
4088
4107
|
|
|
@@ -4210,6 +4229,7 @@ class ExperimentsAPI:
|
|
|
4210
4229
|
if key is not None: body['key'] = key
|
|
4211
4230
|
if value is not None: body['value'] = value
|
|
4212
4231
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4232
|
+
|
|
4213
4233
|
self._api.do('POST', '/api/2.0/mlflow/experiments/set-experiment-tag', body=body, headers=headers)
|
|
4214
4234
|
|
|
4215
4235
|
def set_permissions(
|
|
@@ -4232,6 +4252,7 @@ class ExperimentsAPI:
|
|
|
4232
4252
|
if access_control_list is not None:
|
|
4233
4253
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
4234
4254
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4255
|
+
|
|
4235
4256
|
res = self._api.do('PUT',
|
|
4236
4257
|
f'/api/2.0/permissions/experiments/{experiment_id}',
|
|
4237
4258
|
body=body,
|
|
@@ -4263,6 +4284,7 @@ class ExperimentsAPI:
|
|
|
4263
4284
|
if run_uuid is not None: body['run_uuid'] = run_uuid
|
|
4264
4285
|
if value is not None: body['value'] = value
|
|
4265
4286
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4287
|
+
|
|
4266
4288
|
self._api.do('POST', '/api/2.0/mlflow/runs/set-tag', body=body, headers=headers)
|
|
4267
4289
|
|
|
4268
4290
|
def update_experiment(self, experiment_id: str, *, new_name: Optional[str] = None):
|
|
@@ -4281,6 +4303,7 @@ class ExperimentsAPI:
|
|
|
4281
4303
|
if experiment_id is not None: body['experiment_id'] = experiment_id
|
|
4282
4304
|
if new_name is not None: body['new_name'] = new_name
|
|
4283
4305
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4306
|
+
|
|
4284
4307
|
self._api.do('POST', '/api/2.0/mlflow/experiments/update', body=body, headers=headers)
|
|
4285
4308
|
|
|
4286
4309
|
def update_permissions(
|
|
@@ -4303,6 +4326,7 @@ class ExperimentsAPI:
|
|
|
4303
4326
|
if access_control_list is not None:
|
|
4304
4327
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
4305
4328
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4329
|
+
|
|
4306
4330
|
res = self._api.do('PATCH',
|
|
4307
4331
|
f'/api/2.0/permissions/experiments/{experiment_id}',
|
|
4308
4332
|
body=body,
|
|
@@ -4337,6 +4361,7 @@ class ExperimentsAPI:
|
|
|
4337
4361
|
if run_uuid is not None: body['run_uuid'] = run_uuid
|
|
4338
4362
|
if status is not None: body['status'] = status.value
|
|
4339
4363
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4364
|
+
|
|
4340
4365
|
res = self._api.do('POST', '/api/2.0/mlflow/runs/update', body=body, headers=headers)
|
|
4341
4366
|
return UpdateRunResponse.from_dict(res)
|
|
4342
4367
|
|
|
@@ -4393,6 +4418,7 @@ class ModelRegistryAPI:
|
|
|
4393
4418
|
if stage is not None: body['stage'] = stage.value
|
|
4394
4419
|
if version is not None: body['version'] = version
|
|
4395
4420
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4421
|
+
|
|
4396
4422
|
res = self._api.do('POST', '/api/2.0/mlflow/transition-requests/approve', body=body, headers=headers)
|
|
4397
4423
|
return ApproveTransitionRequestResponse.from_dict(res)
|
|
4398
4424
|
|
|
@@ -4416,6 +4442,7 @@ class ModelRegistryAPI:
|
|
|
4416
4442
|
if name is not None: body['name'] = name
|
|
4417
4443
|
if version is not None: body['version'] = version
|
|
4418
4444
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4445
|
+
|
|
4419
4446
|
res = self._api.do('POST', '/api/2.0/mlflow/comments/create', body=body, headers=headers)
|
|
4420
4447
|
return CreateCommentResponse.from_dict(res)
|
|
4421
4448
|
|
|
@@ -4444,6 +4471,7 @@ class ModelRegistryAPI:
|
|
|
4444
4471
|
if name is not None: body['name'] = name
|
|
4445
4472
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
4446
4473
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4474
|
+
|
|
4447
4475
|
res = self._api.do('POST', '/api/2.0/mlflow/registered-models/create', body=body, headers=headers)
|
|
4448
4476
|
return CreateModelResponse.from_dict(res)
|
|
4449
4477
|
|
|
@@ -4484,6 +4512,7 @@ class ModelRegistryAPI:
|
|
|
4484
4512
|
if source is not None: body['source'] = source
|
|
4485
4513
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
4486
4514
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4515
|
+
|
|
4487
4516
|
res = self._api.do('POST', '/api/2.0/mlflow/model-versions/create', body=body, headers=headers)
|
|
4488
4517
|
return CreateModelVersionResponse.from_dict(res)
|
|
4489
4518
|
|
|
@@ -4522,6 +4551,7 @@ class ModelRegistryAPI:
|
|
|
4522
4551
|
if stage is not None: body['stage'] = stage.value
|
|
4523
4552
|
if version is not None: body['version'] = version
|
|
4524
4553
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4554
|
+
|
|
4525
4555
|
res = self._api.do('POST', '/api/2.0/mlflow/transition-requests/create', body=body, headers=headers)
|
|
4526
4556
|
return CreateTransitionRequestResponse.from_dict(res)
|
|
4527
4557
|
|
|
@@ -4593,6 +4623,7 @@ class ModelRegistryAPI:
|
|
|
4593
4623
|
if model_name is not None: body['model_name'] = model_name
|
|
4594
4624
|
if status is not None: body['status'] = status.value
|
|
4595
4625
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4626
|
+
|
|
4596
4627
|
res = self._api.do('POST', '/api/2.0/mlflow/registry-webhooks/create', body=body, headers=headers)
|
|
4597
4628
|
return CreateWebhookResponse.from_dict(res)
|
|
4598
4629
|
|
|
@@ -4609,6 +4640,7 @@ class ModelRegistryAPI:
|
|
|
4609
4640
|
query = {}
|
|
4610
4641
|
if id is not None: query['id'] = id
|
|
4611
4642
|
headers = {'Accept': 'application/json', }
|
|
4643
|
+
|
|
4612
4644
|
self._api.do('DELETE', '/api/2.0/mlflow/comments/delete', query=query, headers=headers)
|
|
4613
4645
|
|
|
4614
4646
|
def delete_model(self, name: str):
|
|
@@ -4625,6 +4657,7 @@ class ModelRegistryAPI:
|
|
|
4625
4657
|
query = {}
|
|
4626
4658
|
if name is not None: query['name'] = name
|
|
4627
4659
|
headers = {'Accept': 'application/json', }
|
|
4660
|
+
|
|
4628
4661
|
self._api.do('DELETE', '/api/2.0/mlflow/registered-models/delete', query=query, headers=headers)
|
|
4629
4662
|
|
|
4630
4663
|
def delete_model_tag(self, name: str, key: str):
|
|
@@ -4645,6 +4678,7 @@ class ModelRegistryAPI:
|
|
|
4645
4678
|
if key is not None: query['key'] = key
|
|
4646
4679
|
if name is not None: query['name'] = name
|
|
4647
4680
|
headers = {'Accept': 'application/json', }
|
|
4681
|
+
|
|
4648
4682
|
self._api.do('DELETE', '/api/2.0/mlflow/registered-models/delete-tag', query=query, headers=headers)
|
|
4649
4683
|
|
|
4650
4684
|
def delete_model_version(self, name: str, version: str):
|
|
@@ -4664,6 +4698,7 @@ class ModelRegistryAPI:
|
|
|
4664
4698
|
if name is not None: query['name'] = name
|
|
4665
4699
|
if version is not None: query['version'] = version
|
|
4666
4700
|
headers = {'Accept': 'application/json', }
|
|
4701
|
+
|
|
4667
4702
|
self._api.do('DELETE', '/api/2.0/mlflow/model-versions/delete', query=query, headers=headers)
|
|
4668
4703
|
|
|
4669
4704
|
def delete_model_version_tag(self, name: str, version: str, key: str):
|
|
@@ -4687,6 +4722,7 @@ class ModelRegistryAPI:
|
|
|
4687
4722
|
if name is not None: query['name'] = name
|
|
4688
4723
|
if version is not None: query['version'] = version
|
|
4689
4724
|
headers = {'Accept': 'application/json', }
|
|
4725
|
+
|
|
4690
4726
|
self._api.do('DELETE', '/api/2.0/mlflow/model-versions/delete-tag', query=query, headers=headers)
|
|
4691
4727
|
|
|
4692
4728
|
def delete_transition_request(self,
|
|
@@ -4730,6 +4766,7 @@ class ModelRegistryAPI:
|
|
|
4730
4766
|
if stage is not None: query['stage'] = stage.value
|
|
4731
4767
|
if version is not None: query['version'] = version
|
|
4732
4768
|
headers = {'Accept': 'application/json', }
|
|
4769
|
+
|
|
4733
4770
|
self._api.do('DELETE', '/api/2.0/mlflow/transition-requests/delete', query=query, headers=headers)
|
|
4734
4771
|
|
|
4735
4772
|
def delete_webhook(self, *, id: Optional[str] = None):
|
|
@@ -4748,6 +4785,7 @@ class ModelRegistryAPI:
|
|
|
4748
4785
|
query = {}
|
|
4749
4786
|
if id is not None: query['id'] = id
|
|
4750
4787
|
headers = {'Accept': 'application/json', }
|
|
4788
|
+
|
|
4751
4789
|
self._api.do('DELETE', '/api/2.0/mlflow/registry-webhooks/delete', query=query, headers=headers)
|
|
4752
4790
|
|
|
4753
4791
|
def get_latest_versions(self, name: str, *, stages: Optional[List[str]] = None) -> Iterator[ModelVersion]:
|
|
@@ -4766,6 +4804,7 @@ class ModelRegistryAPI:
|
|
|
4766
4804
|
if name is not None: body['name'] = name
|
|
4767
4805
|
if stages is not None: body['stages'] = [v for v in stages]
|
|
4768
4806
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4807
|
+
|
|
4769
4808
|
json = self._api.do('POST',
|
|
4770
4809
|
'/api/2.0/mlflow/registered-models/get-latest-versions',
|
|
4771
4810
|
body=body,
|
|
@@ -4791,6 +4830,7 @@ class ModelRegistryAPI:
|
|
|
4791
4830
|
query = {}
|
|
4792
4831
|
if name is not None: query['name'] = name
|
|
4793
4832
|
headers = {'Accept': 'application/json', }
|
|
4833
|
+
|
|
4794
4834
|
res = self._api.do('GET',
|
|
4795
4835
|
'/api/2.0/mlflow/databricks/registered-models/get',
|
|
4796
4836
|
query=query,
|
|
@@ -4814,6 +4854,7 @@ class ModelRegistryAPI:
|
|
|
4814
4854
|
if name is not None: query['name'] = name
|
|
4815
4855
|
if version is not None: query['version'] = version
|
|
4816
4856
|
headers = {'Accept': 'application/json', }
|
|
4857
|
+
|
|
4817
4858
|
res = self._api.do('GET', '/api/2.0/mlflow/model-versions/get', query=query, headers=headers)
|
|
4818
4859
|
return GetModelVersionResponse.from_dict(res)
|
|
4819
4860
|
|
|
@@ -4834,6 +4875,7 @@ class ModelRegistryAPI:
|
|
|
4834
4875
|
if name is not None: query['name'] = name
|
|
4835
4876
|
if version is not None: query['version'] = version
|
|
4836
4877
|
headers = {'Accept': 'application/json', }
|
|
4878
|
+
|
|
4837
4879
|
res = self._api.do('GET',
|
|
4838
4880
|
'/api/2.0/mlflow/model-versions/get-download-uri',
|
|
4839
4881
|
query=query,
|
|
@@ -4852,6 +4894,7 @@ class ModelRegistryAPI:
|
|
|
4852
4894
|
"""
|
|
4853
4895
|
|
|
4854
4896
|
headers = {'Accept': 'application/json', }
|
|
4897
|
+
|
|
4855
4898
|
res = self._api.do('GET',
|
|
4856
4899
|
f'/api/2.0/permissions/registered-models/{registered_model_id}/permissionLevels',
|
|
4857
4900
|
headers=headers)
|
|
@@ -4870,6 +4913,7 @@ class ModelRegistryAPI:
|
|
|
4870
4913
|
"""
|
|
4871
4914
|
|
|
4872
4915
|
headers = {'Accept': 'application/json', }
|
|
4916
|
+
|
|
4873
4917
|
res = self._api.do('GET',
|
|
4874
4918
|
f'/api/2.0/permissions/registered-models/{registered_model_id}',
|
|
4875
4919
|
headers=headers)
|
|
@@ -4922,6 +4966,7 @@ class ModelRegistryAPI:
|
|
|
4922
4966
|
if name is not None: query['name'] = name
|
|
4923
4967
|
if version is not None: query['version'] = version
|
|
4924
4968
|
headers = {'Accept': 'application/json', }
|
|
4969
|
+
|
|
4925
4970
|
json = self._api.do('GET', '/api/2.0/mlflow/transition-requests/list', query=query, headers=headers)
|
|
4926
4971
|
parsed = ListTransitionRequestsResponse.from_dict(json).requests
|
|
4927
4972
|
return parsed if parsed is not None else []
|
|
@@ -4999,6 +5044,7 @@ class ModelRegistryAPI:
|
|
|
4999
5044
|
if stage is not None: body['stage'] = stage.value
|
|
5000
5045
|
if version is not None: body['version'] = version
|
|
5001
5046
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5047
|
+
|
|
5002
5048
|
res = self._api.do('POST', '/api/2.0/mlflow/transition-requests/reject', body=body, headers=headers)
|
|
5003
5049
|
return RejectTransitionRequestResponse.from_dict(res)
|
|
5004
5050
|
|
|
@@ -5018,6 +5064,7 @@ class ModelRegistryAPI:
|
|
|
5018
5064
|
if name is not None: body['name'] = name
|
|
5019
5065
|
if new_name is not None: body['new_name'] = new_name
|
|
5020
5066
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5067
|
+
|
|
5021
5068
|
res = self._api.do('POST', '/api/2.0/mlflow/registered-models/rename', body=body, headers=headers)
|
|
5022
5069
|
return RenameModelResponse.from_dict(res)
|
|
5023
5070
|
|
|
@@ -5129,6 +5176,7 @@ class ModelRegistryAPI:
|
|
|
5129
5176
|
if name is not None: body['name'] = name
|
|
5130
5177
|
if value is not None: body['value'] = value
|
|
5131
5178
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5179
|
+
|
|
5132
5180
|
self._api.do('POST', '/api/2.0/mlflow/registered-models/set-tag', body=body, headers=headers)
|
|
5133
5181
|
|
|
5134
5182
|
def set_model_version_tag(self, name: str, version: str, key: str, value: str):
|
|
@@ -5156,6 +5204,7 @@ class ModelRegistryAPI:
|
|
|
5156
5204
|
if value is not None: body['value'] = value
|
|
5157
5205
|
if version is not None: body['version'] = version
|
|
5158
5206
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5207
|
+
|
|
5159
5208
|
self._api.do('POST', '/api/2.0/mlflow/model-versions/set-tag', body=body, headers=headers)
|
|
5160
5209
|
|
|
5161
5210
|
def set_permissions(
|
|
@@ -5179,6 +5228,7 @@ class ModelRegistryAPI:
|
|
|
5179
5228
|
if access_control_list is not None:
|
|
5180
5229
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
5181
5230
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5231
|
+
|
|
5182
5232
|
res = self._api.do('PUT',
|
|
5183
5233
|
f'/api/2.0/permissions/registered-models/{registered_model_id}',
|
|
5184
5234
|
body=body,
|
|
@@ -5207,6 +5257,7 @@ class ModelRegistryAPI:
|
|
|
5207
5257
|
if event is not None: body['event'] = event.value
|
|
5208
5258
|
if id is not None: body['id'] = id
|
|
5209
5259
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5260
|
+
|
|
5210
5261
|
res = self._api.do('POST', '/api/2.0/mlflow/registry-webhooks/test', body=body, headers=headers)
|
|
5211
5262
|
return TestRegistryWebhookResponse.from_dict(res)
|
|
5212
5263
|
|
|
@@ -5253,6 +5304,7 @@ class ModelRegistryAPI:
|
|
|
5253
5304
|
if stage is not None: body['stage'] = stage.value
|
|
5254
5305
|
if version is not None: body['version'] = version
|
|
5255
5306
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5307
|
+
|
|
5256
5308
|
res = self._api.do('POST',
|
|
5257
5309
|
'/api/2.0/mlflow/databricks/model-versions/transition-stage',
|
|
5258
5310
|
body=body,
|
|
@@ -5275,6 +5327,7 @@ class ModelRegistryAPI:
|
|
|
5275
5327
|
if comment is not None: body['comment'] = comment
|
|
5276
5328
|
if id is not None: body['id'] = id
|
|
5277
5329
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5330
|
+
|
|
5278
5331
|
res = self._api.do('PATCH', '/api/2.0/mlflow/comments/update', body=body, headers=headers)
|
|
5279
5332
|
return UpdateCommentResponse.from_dict(res)
|
|
5280
5333
|
|
|
@@ -5294,6 +5347,7 @@ class ModelRegistryAPI:
|
|
|
5294
5347
|
if description is not None: body['description'] = description
|
|
5295
5348
|
if name is not None: body['name'] = name
|
|
5296
5349
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5350
|
+
|
|
5297
5351
|
self._api.do('PATCH', '/api/2.0/mlflow/registered-models/update', body=body, headers=headers)
|
|
5298
5352
|
|
|
5299
5353
|
def update_model_version(self, name: str, version: str, *, description: Optional[str] = None):
|
|
@@ -5315,6 +5369,7 @@ class ModelRegistryAPI:
|
|
|
5315
5369
|
if name is not None: body['name'] = name
|
|
5316
5370
|
if version is not None: body['version'] = version
|
|
5317
5371
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5372
|
+
|
|
5318
5373
|
self._api.do('PATCH', '/api/2.0/mlflow/model-versions/update', body=body, headers=headers)
|
|
5319
5374
|
|
|
5320
5375
|
def update_permissions(
|
|
@@ -5338,6 +5393,7 @@ class ModelRegistryAPI:
|
|
|
5338
5393
|
if access_control_list is not None:
|
|
5339
5394
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
5340
5395
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5396
|
+
|
|
5341
5397
|
res = self._api.do('PATCH',
|
|
5342
5398
|
f'/api/2.0/permissions/registered-models/{registered_model_id}',
|
|
5343
5399
|
body=body,
|
|
@@ -5412,4 +5468,5 @@ class ModelRegistryAPI:
|
|
|
5412
5468
|
if job_spec is not None: body['job_spec'] = job_spec.as_dict()
|
|
5413
5469
|
if status is not None: body['status'] = status.value
|
|
5414
5470
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5471
|
+
|
|
5415
5472
|
self._api.do('PATCH', '/api/2.0/mlflow/registry-webhooks/update', body=body, headers=headers)
|
databricks/sdk/service/oauth2.py
CHANGED
|
@@ -508,6 +508,7 @@ class CustomAppIntegrationAPI:
|
|
|
508
508
|
if scopes is not None: body['scopes'] = [v for v in scopes]
|
|
509
509
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
510
510
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
511
|
+
|
|
511
512
|
res = self._api.do('POST',
|
|
512
513
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations',
|
|
513
514
|
body=body,
|
|
@@ -527,6 +528,7 @@ class CustomAppIntegrationAPI:
|
|
|
527
528
|
"""
|
|
528
529
|
|
|
529
530
|
headers = {'Accept': 'application/json', }
|
|
531
|
+
|
|
530
532
|
self._api.do(
|
|
531
533
|
'DELETE',
|
|
532
534
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations/{integration_id}',
|
|
@@ -544,6 +546,7 @@ class CustomAppIntegrationAPI:
|
|
|
544
546
|
"""
|
|
545
547
|
|
|
546
548
|
headers = {'Accept': 'application/json', }
|
|
549
|
+
|
|
547
550
|
res = self._api.do(
|
|
548
551
|
'GET',
|
|
549
552
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations/{integration_id}',
|
|
@@ -559,6 +562,7 @@ class CustomAppIntegrationAPI:
|
|
|
559
562
|
"""
|
|
560
563
|
|
|
561
564
|
headers = {'Accept': 'application/json', }
|
|
565
|
+
|
|
562
566
|
json = self._api.do('GET',
|
|
563
567
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations',
|
|
564
568
|
headers=headers)
|
|
@@ -588,6 +592,7 @@ class CustomAppIntegrationAPI:
|
|
|
588
592
|
if redirect_urls is not None: body['redirect_urls'] = [v for v in redirect_urls]
|
|
589
593
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
590
594
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
595
|
+
|
|
591
596
|
self._api.do(
|
|
592
597
|
'PATCH',
|
|
593
598
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/custom-app-integrations/{integration_id}',
|
|
@@ -666,6 +671,7 @@ class PublishedAppIntegrationAPI:
|
|
|
666
671
|
if app_id is not None: body['app_id'] = app_id
|
|
667
672
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
668
673
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
674
|
+
|
|
669
675
|
res = self._api.do('POST',
|
|
670
676
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations',
|
|
671
677
|
body=body,
|
|
@@ -685,6 +691,7 @@ class PublishedAppIntegrationAPI:
|
|
|
685
691
|
"""
|
|
686
692
|
|
|
687
693
|
headers = {'Accept': 'application/json', }
|
|
694
|
+
|
|
688
695
|
self._api.do(
|
|
689
696
|
'DELETE',
|
|
690
697
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations/{integration_id}',
|
|
@@ -702,6 +709,7 @@ class PublishedAppIntegrationAPI:
|
|
|
702
709
|
"""
|
|
703
710
|
|
|
704
711
|
headers = {'Accept': 'application/json', }
|
|
712
|
+
|
|
705
713
|
res = self._api.do(
|
|
706
714
|
'GET',
|
|
707
715
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations/{integration_id}',
|
|
@@ -717,6 +725,7 @@ class PublishedAppIntegrationAPI:
|
|
|
717
725
|
"""
|
|
718
726
|
|
|
719
727
|
headers = {'Accept': 'application/json', }
|
|
728
|
+
|
|
720
729
|
json = self._api.do('GET',
|
|
721
730
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations',
|
|
722
731
|
headers=headers)
|
|
@@ -739,6 +748,7 @@ class PublishedAppIntegrationAPI:
|
|
|
739
748
|
body = {}
|
|
740
749
|
if token_access_policy is not None: body['token_access_policy'] = token_access_policy.as_dict()
|
|
741
750
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
751
|
+
|
|
742
752
|
self._api.do(
|
|
743
753
|
'PATCH',
|
|
744
754
|
f'/api/2.0/accounts/{self._api.account_id}/oauth2/published-app-integrations/{integration_id}',
|
|
@@ -774,6 +784,7 @@ class ServicePrincipalSecretsAPI:
|
|
|
774
784
|
"""
|
|
775
785
|
|
|
776
786
|
headers = {'Accept': 'application/json', }
|
|
787
|
+
|
|
777
788
|
res = self._api.do(
|
|
778
789
|
'POST',
|
|
779
790
|
f'/api/2.0/accounts/{self._api.account_id}/servicePrincipals/{service_principal_id}/credentials/secrets',
|
|
@@ -794,6 +805,7 @@ class ServicePrincipalSecretsAPI:
|
|
|
794
805
|
"""
|
|
795
806
|
|
|
796
807
|
headers = {}
|
|
808
|
+
|
|
797
809
|
self._api.do(
|
|
798
810
|
'DELETE',
|
|
799
811
|
f'/api/2.0/accounts/{self._api.account_id}/servicePrincipals/{service_principal_id}/credentials/secrets/{secret_id}',
|
|
@@ -812,6 +824,7 @@ class ServicePrincipalSecretsAPI:
|
|
|
812
824
|
"""
|
|
813
825
|
|
|
814
826
|
headers = {'Accept': 'application/json', }
|
|
827
|
+
|
|
815
828
|
json = self._api.do(
|
|
816
829
|
'GET',
|
|
817
830
|
f'/api/2.0/accounts/{self._api.account_id}/servicePrincipals/{service_principal_id}/credentials/secrets',
|
|
@@ -1810,6 +1810,7 @@ class PipelinesAPI:
|
|
|
1810
1810
|
if target is not None: body['target'] = target
|
|
1811
1811
|
if trigger is not None: body['trigger'] = trigger.as_dict()
|
|
1812
1812
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
1813
|
+
|
|
1813
1814
|
res = self._api.do('POST', '/api/2.0/pipelines', body=body, headers=headers)
|
|
1814
1815
|
return CreatePipelineResponse.from_dict(res)
|
|
1815
1816
|
|
|
@@ -1824,6 +1825,7 @@ class PipelinesAPI:
|
|
|
1824
1825
|
"""
|
|
1825
1826
|
|
|
1826
1827
|
headers = {'Accept': 'application/json', }
|
|
1828
|
+
|
|
1827
1829
|
self._api.do('DELETE', f'/api/2.0/pipelines/{pipeline_id}', headers=headers)
|
|
1828
1830
|
|
|
1829
1831
|
def get(self, pipeline_id: str) -> GetPipelineResponse:
|
|
@@ -1835,6 +1837,7 @@ class PipelinesAPI:
|
|
|
1835
1837
|
"""
|
|
1836
1838
|
|
|
1837
1839
|
headers = {'Accept': 'application/json', }
|
|
1840
|
+
|
|
1838
1841
|
res = self._api.do('GET', f'/api/2.0/pipelines/{pipeline_id}', headers=headers)
|
|
1839
1842
|
return GetPipelineResponse.from_dict(res)
|
|
1840
1843
|
|
|
@@ -1850,6 +1853,7 @@ class PipelinesAPI:
|
|
|
1850
1853
|
"""
|
|
1851
1854
|
|
|
1852
1855
|
headers = {'Accept': 'application/json', }
|
|
1856
|
+
|
|
1853
1857
|
res = self._api.do('GET',
|
|
1854
1858
|
f'/api/2.0/permissions/pipelines/{pipeline_id}/permissionLevels',
|
|
1855
1859
|
headers=headers)
|
|
@@ -1867,6 +1871,7 @@ class PipelinesAPI:
|
|
|
1867
1871
|
"""
|
|
1868
1872
|
|
|
1869
1873
|
headers = {'Accept': 'application/json', }
|
|
1874
|
+
|
|
1870
1875
|
res = self._api.do('GET', f'/api/2.0/permissions/pipelines/{pipeline_id}', headers=headers)
|
|
1871
1876
|
return PipelinePermissions.from_dict(res)
|
|
1872
1877
|
|
|
@@ -1884,6 +1889,7 @@ class PipelinesAPI:
|
|
|
1884
1889
|
"""
|
|
1885
1890
|
|
|
1886
1891
|
headers = {'Accept': 'application/json', }
|
|
1892
|
+
|
|
1887
1893
|
res = self._api.do('GET', f'/api/2.0/pipelines/{pipeline_id}/updates/{update_id}', headers=headers)
|
|
1888
1894
|
return GetUpdateResponse.from_dict(res)
|
|
1889
1895
|
|
|
@@ -2015,6 +2021,7 @@ class PipelinesAPI:
|
|
|
2015
2021
|
if page_token is not None: query['page_token'] = page_token
|
|
2016
2022
|
if until_update_id is not None: query['until_update_id'] = until_update_id
|
|
2017
2023
|
headers = {'Accept': 'application/json', }
|
|
2024
|
+
|
|
2018
2025
|
res = self._api.do('GET', f'/api/2.0/pipelines/{pipeline_id}/updates', query=query, headers=headers)
|
|
2019
2026
|
return ListUpdatesResponse.from_dict(res)
|
|
2020
2027
|
|
|
@@ -2037,6 +2044,7 @@ class PipelinesAPI:
|
|
|
2037
2044
|
if access_control_list is not None:
|
|
2038
2045
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
2039
2046
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2047
|
+
|
|
2040
2048
|
res = self._api.do('PUT', f'/api/2.0/permissions/pipelines/{pipeline_id}', body=body, headers=headers)
|
|
2041
2049
|
return PipelinePermissions.from_dict(res)
|
|
2042
2050
|
|
|
@@ -2079,6 +2087,7 @@ class PipelinesAPI:
|
|
|
2079
2087
|
if refresh_selection is not None: body['refresh_selection'] = [v for v in refresh_selection]
|
|
2080
2088
|
if validate_only is not None: body['validate_only'] = validate_only
|
|
2081
2089
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2090
|
+
|
|
2082
2091
|
res = self._api.do('POST', f'/api/2.0/pipelines/{pipeline_id}/updates', body=body, headers=headers)
|
|
2083
2092
|
return StartUpdateResponse.from_dict(res)
|
|
2084
2093
|
|
|
@@ -2096,6 +2105,7 @@ class PipelinesAPI:
|
|
|
2096
2105
|
"""
|
|
2097
2106
|
|
|
2098
2107
|
headers = {'Accept': 'application/json', }
|
|
2108
|
+
|
|
2099
2109
|
self._api.do('POST', f'/api/2.0/pipelines/{pipeline_id}/stop', headers=headers)
|
|
2100
2110
|
return Wait(self.wait_get_pipeline_idle, pipeline_id=pipeline_id)
|
|
2101
2111
|
|
|
@@ -2196,6 +2206,7 @@ class PipelinesAPI:
|
|
|
2196
2206
|
if target is not None: body['target'] = target
|
|
2197
2207
|
if trigger is not None: body['trigger'] = trigger.as_dict()
|
|
2198
2208
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2209
|
+
|
|
2199
2210
|
self._api.do('PUT', f'/api/2.0/pipelines/{pipeline_id}', body=body, headers=headers)
|
|
2200
2211
|
|
|
2201
2212
|
def update_permissions(
|
|
@@ -2217,6 +2228,7 @@ class PipelinesAPI:
|
|
|
2217
2228
|
if access_control_list is not None:
|
|
2218
2229
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
2219
2230
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
2231
|
+
|
|
2220
2232
|
res = self._api.do('PATCH',
|
|
2221
2233
|
f'/api/2.0/permissions/pipelines/{pipeline_id}',
|
|
2222
2234
|
body=body,
|