databricks-sdk 0.19.1__py3-none-any.whl → 0.21.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 +28 -6
- databricks/sdk/_widgets/__init__.py +2 -2
- databricks/sdk/config.py +3 -2
- databricks/sdk/core.py +4 -2
- databricks/sdk/mixins/workspace.py +2 -1
- databricks/sdk/oauth.py +1 -1
- databricks/sdk/runtime/__init__.py +85 -11
- databricks/sdk/runtime/dbutils_stub.py +1 -1
- databricks/sdk/service/_internal.py +1 -1
- databricks/sdk/service/billing.py +64 -1
- databricks/sdk/service/catalog.py +796 -84
- databricks/sdk/service/compute.py +391 -13
- databricks/sdk/service/dashboards.py +15 -0
- databricks/sdk/service/files.py +289 -15
- databricks/sdk/service/iam.py +214 -0
- databricks/sdk/service/jobs.py +242 -143
- databricks/sdk/service/ml.py +407 -0
- databricks/sdk/service/oauth2.py +83 -0
- databricks/sdk/service/pipelines.py +78 -8
- databricks/sdk/service/provisioning.py +108 -36
- databricks/sdk/service/serving.py +101 -35
- databricks/sdk/service/settings.py +1316 -186
- databricks/sdk/service/sharing.py +94 -18
- databricks/sdk/service/sql.py +230 -13
- databricks/sdk/service/vectorsearch.py +105 -60
- databricks/sdk/service/workspace.py +175 -1
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/METADATA +3 -1
- databricks_sdk-0.21.0.dist-info/RECORD +53 -0
- databricks/sdk/runtime/stub.py +0 -48
- databricks_sdk-0.19.1.dist-info/RECORD +0 -54
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.19.1.dist-info → databricks_sdk-0.21.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/ml.py
CHANGED
|
@@ -716,6 +716,20 @@ class DatasetInput:
|
|
|
716
716
|
return cls(dataset=_from_dict(d, 'dataset', Dataset), tags=_repeated_dict(d, 'tags', InputTag))
|
|
717
717
|
|
|
718
718
|
|
|
719
|
+
@dataclass
|
|
720
|
+
class DeleteCommentResponse:
|
|
721
|
+
|
|
722
|
+
def as_dict(self) -> dict:
|
|
723
|
+
"""Serializes the DeleteCommentResponse into a dictionary suitable for use as a JSON request body."""
|
|
724
|
+
body = {}
|
|
725
|
+
return body
|
|
726
|
+
|
|
727
|
+
@classmethod
|
|
728
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteCommentResponse:
|
|
729
|
+
"""Deserializes the DeleteCommentResponse from a dictionary."""
|
|
730
|
+
return cls()
|
|
731
|
+
|
|
732
|
+
|
|
719
733
|
@dataclass
|
|
720
734
|
class DeleteExperiment:
|
|
721
735
|
experiment_id: str
|
|
@@ -733,6 +747,76 @@ class DeleteExperiment:
|
|
|
733
747
|
return cls(experiment_id=d.get('experiment_id', None))
|
|
734
748
|
|
|
735
749
|
|
|
750
|
+
@dataclass
|
|
751
|
+
class DeleteExperimentResponse:
|
|
752
|
+
|
|
753
|
+
def as_dict(self) -> dict:
|
|
754
|
+
"""Serializes the DeleteExperimentResponse into a dictionary suitable for use as a JSON request body."""
|
|
755
|
+
body = {}
|
|
756
|
+
return body
|
|
757
|
+
|
|
758
|
+
@classmethod
|
|
759
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteExperimentResponse:
|
|
760
|
+
"""Deserializes the DeleteExperimentResponse from a dictionary."""
|
|
761
|
+
return cls()
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
@dataclass
|
|
765
|
+
class DeleteModelResponse:
|
|
766
|
+
|
|
767
|
+
def as_dict(self) -> dict:
|
|
768
|
+
"""Serializes the DeleteModelResponse into a dictionary suitable for use as a JSON request body."""
|
|
769
|
+
body = {}
|
|
770
|
+
return body
|
|
771
|
+
|
|
772
|
+
@classmethod
|
|
773
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteModelResponse:
|
|
774
|
+
"""Deserializes the DeleteModelResponse from a dictionary."""
|
|
775
|
+
return cls()
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
@dataclass
|
|
779
|
+
class DeleteModelTagResponse:
|
|
780
|
+
|
|
781
|
+
def as_dict(self) -> dict:
|
|
782
|
+
"""Serializes the DeleteModelTagResponse into a dictionary suitable for use as a JSON request body."""
|
|
783
|
+
body = {}
|
|
784
|
+
return body
|
|
785
|
+
|
|
786
|
+
@classmethod
|
|
787
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteModelTagResponse:
|
|
788
|
+
"""Deserializes the DeleteModelTagResponse from a dictionary."""
|
|
789
|
+
return cls()
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
@dataclass
|
|
793
|
+
class DeleteModelVersionResponse:
|
|
794
|
+
|
|
795
|
+
def as_dict(self) -> dict:
|
|
796
|
+
"""Serializes the DeleteModelVersionResponse into a dictionary suitable for use as a JSON request body."""
|
|
797
|
+
body = {}
|
|
798
|
+
return body
|
|
799
|
+
|
|
800
|
+
@classmethod
|
|
801
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteModelVersionResponse:
|
|
802
|
+
"""Deserializes the DeleteModelVersionResponse from a dictionary."""
|
|
803
|
+
return cls()
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
@dataclass
|
|
807
|
+
class DeleteModelVersionTagResponse:
|
|
808
|
+
|
|
809
|
+
def as_dict(self) -> dict:
|
|
810
|
+
"""Serializes the DeleteModelVersionTagResponse into a dictionary suitable for use as a JSON request body."""
|
|
811
|
+
body = {}
|
|
812
|
+
return body
|
|
813
|
+
|
|
814
|
+
@classmethod
|
|
815
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteModelVersionTagResponse:
|
|
816
|
+
"""Deserializes the DeleteModelVersionTagResponse from a dictionary."""
|
|
817
|
+
return cls()
|
|
818
|
+
|
|
819
|
+
|
|
736
820
|
@dataclass
|
|
737
821
|
class DeleteRun:
|
|
738
822
|
run_id: str
|
|
@@ -750,6 +834,20 @@ class DeleteRun:
|
|
|
750
834
|
return cls(run_id=d.get('run_id', None))
|
|
751
835
|
|
|
752
836
|
|
|
837
|
+
@dataclass
|
|
838
|
+
class DeleteRunResponse:
|
|
839
|
+
|
|
840
|
+
def as_dict(self) -> dict:
|
|
841
|
+
"""Serializes the DeleteRunResponse into a dictionary suitable for use as a JSON request body."""
|
|
842
|
+
body = {}
|
|
843
|
+
return body
|
|
844
|
+
|
|
845
|
+
@classmethod
|
|
846
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteRunResponse:
|
|
847
|
+
"""Deserializes the DeleteRunResponse from a dictionary."""
|
|
848
|
+
return cls()
|
|
849
|
+
|
|
850
|
+
|
|
753
851
|
@dataclass
|
|
754
852
|
class DeleteRuns:
|
|
755
853
|
experiment_id: str
|
|
@@ -817,6 +915,34 @@ class DeleteTag:
|
|
|
817
915
|
return cls(key=d.get('key', None), run_id=d.get('run_id', None))
|
|
818
916
|
|
|
819
917
|
|
|
918
|
+
@dataclass
|
|
919
|
+
class DeleteTagResponse:
|
|
920
|
+
|
|
921
|
+
def as_dict(self) -> dict:
|
|
922
|
+
"""Serializes the DeleteTagResponse into a dictionary suitable for use as a JSON request body."""
|
|
923
|
+
body = {}
|
|
924
|
+
return body
|
|
925
|
+
|
|
926
|
+
@classmethod
|
|
927
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteTagResponse:
|
|
928
|
+
"""Deserializes the DeleteTagResponse from a dictionary."""
|
|
929
|
+
return cls()
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
@dataclass
|
|
933
|
+
class DeleteTransitionRequestResponse:
|
|
934
|
+
|
|
935
|
+
def as_dict(self) -> dict:
|
|
936
|
+
"""Serializes the DeleteTransitionRequestResponse into a dictionary suitable for use as a JSON request body."""
|
|
937
|
+
body = {}
|
|
938
|
+
return body
|
|
939
|
+
|
|
940
|
+
@classmethod
|
|
941
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteTransitionRequestResponse:
|
|
942
|
+
"""Deserializes the DeleteTransitionRequestResponse from a dictionary."""
|
|
943
|
+
return cls()
|
|
944
|
+
|
|
945
|
+
|
|
820
946
|
class DeleteTransitionRequestStage(Enum):
|
|
821
947
|
|
|
822
948
|
ARCHIVED = 'Archived'
|
|
@@ -825,6 +951,20 @@ class DeleteTransitionRequestStage(Enum):
|
|
|
825
951
|
STAGING = 'Staging'
|
|
826
952
|
|
|
827
953
|
|
|
954
|
+
@dataclass
|
|
955
|
+
class DeleteWebhookResponse:
|
|
956
|
+
|
|
957
|
+
def as_dict(self) -> dict:
|
|
958
|
+
"""Serializes the DeleteWebhookResponse into a dictionary suitable for use as a JSON request body."""
|
|
959
|
+
body = {}
|
|
960
|
+
return body
|
|
961
|
+
|
|
962
|
+
@classmethod
|
|
963
|
+
def from_dict(cls, d: Dict[str, any]) -> DeleteWebhookResponse:
|
|
964
|
+
"""Deserializes the DeleteWebhookResponse from a dictionary."""
|
|
965
|
+
return cls()
|
|
966
|
+
|
|
967
|
+
|
|
828
968
|
@dataclass
|
|
829
969
|
class Experiment:
|
|
830
970
|
artifact_location: Optional[str] = None
|
|
@@ -1556,6 +1696,20 @@ class LogBatch:
|
|
|
1556
1696
|
tags=_repeated_dict(d, 'tags', RunTag))
|
|
1557
1697
|
|
|
1558
1698
|
|
|
1699
|
+
@dataclass
|
|
1700
|
+
class LogBatchResponse:
|
|
1701
|
+
|
|
1702
|
+
def as_dict(self) -> dict:
|
|
1703
|
+
"""Serializes the LogBatchResponse into a dictionary suitable for use as a JSON request body."""
|
|
1704
|
+
body = {}
|
|
1705
|
+
return body
|
|
1706
|
+
|
|
1707
|
+
@classmethod
|
|
1708
|
+
def from_dict(cls, d: Dict[str, any]) -> LogBatchResponse:
|
|
1709
|
+
"""Deserializes the LogBatchResponse from a dictionary."""
|
|
1710
|
+
return cls()
|
|
1711
|
+
|
|
1712
|
+
|
|
1559
1713
|
@dataclass
|
|
1560
1714
|
class LogInputs:
|
|
1561
1715
|
datasets: Optional[List[DatasetInput]] = None
|
|
@@ -1577,6 +1731,20 @@ class LogInputs:
|
|
|
1577
1731
|
return cls(datasets=_repeated_dict(d, 'datasets', DatasetInput), run_id=d.get('run_id', None))
|
|
1578
1732
|
|
|
1579
1733
|
|
|
1734
|
+
@dataclass
|
|
1735
|
+
class LogInputsResponse:
|
|
1736
|
+
|
|
1737
|
+
def as_dict(self) -> dict:
|
|
1738
|
+
"""Serializes the LogInputsResponse into a dictionary suitable for use as a JSON request body."""
|
|
1739
|
+
body = {}
|
|
1740
|
+
return body
|
|
1741
|
+
|
|
1742
|
+
@classmethod
|
|
1743
|
+
def from_dict(cls, d: Dict[str, any]) -> LogInputsResponse:
|
|
1744
|
+
"""Deserializes the LogInputsResponse from a dictionary."""
|
|
1745
|
+
return cls()
|
|
1746
|
+
|
|
1747
|
+
|
|
1580
1748
|
@dataclass
|
|
1581
1749
|
class LogMetric:
|
|
1582
1750
|
key: str
|
|
@@ -1620,6 +1788,20 @@ class LogMetric:
|
|
|
1620
1788
|
value=d.get('value', None))
|
|
1621
1789
|
|
|
1622
1790
|
|
|
1791
|
+
@dataclass
|
|
1792
|
+
class LogMetricResponse:
|
|
1793
|
+
|
|
1794
|
+
def as_dict(self) -> dict:
|
|
1795
|
+
"""Serializes the LogMetricResponse into a dictionary suitable for use as a JSON request body."""
|
|
1796
|
+
body = {}
|
|
1797
|
+
return body
|
|
1798
|
+
|
|
1799
|
+
@classmethod
|
|
1800
|
+
def from_dict(cls, d: Dict[str, any]) -> LogMetricResponse:
|
|
1801
|
+
"""Deserializes the LogMetricResponse from a dictionary."""
|
|
1802
|
+
return cls()
|
|
1803
|
+
|
|
1804
|
+
|
|
1623
1805
|
@dataclass
|
|
1624
1806
|
class LogModel:
|
|
1625
1807
|
model_json: Optional[str] = None
|
|
@@ -1641,6 +1823,20 @@ class LogModel:
|
|
|
1641
1823
|
return cls(model_json=d.get('model_json', None), run_id=d.get('run_id', None))
|
|
1642
1824
|
|
|
1643
1825
|
|
|
1826
|
+
@dataclass
|
|
1827
|
+
class LogModelResponse:
|
|
1828
|
+
|
|
1829
|
+
def as_dict(self) -> dict:
|
|
1830
|
+
"""Serializes the LogModelResponse into a dictionary suitable for use as a JSON request body."""
|
|
1831
|
+
body = {}
|
|
1832
|
+
return body
|
|
1833
|
+
|
|
1834
|
+
@classmethod
|
|
1835
|
+
def from_dict(cls, d: Dict[str, any]) -> LogModelResponse:
|
|
1836
|
+
"""Deserializes the LogModelResponse from a dictionary."""
|
|
1837
|
+
return cls()
|
|
1838
|
+
|
|
1839
|
+
|
|
1644
1840
|
@dataclass
|
|
1645
1841
|
class LogParam:
|
|
1646
1842
|
key: str
|
|
@@ -1674,6 +1870,20 @@ class LogParam:
|
|
|
1674
1870
|
value=d.get('value', None))
|
|
1675
1871
|
|
|
1676
1872
|
|
|
1873
|
+
@dataclass
|
|
1874
|
+
class LogParamResponse:
|
|
1875
|
+
|
|
1876
|
+
def as_dict(self) -> dict:
|
|
1877
|
+
"""Serializes the LogParamResponse into a dictionary suitable for use as a JSON request body."""
|
|
1878
|
+
body = {}
|
|
1879
|
+
return body
|
|
1880
|
+
|
|
1881
|
+
@classmethod
|
|
1882
|
+
def from_dict(cls, d: Dict[str, any]) -> LogParamResponse:
|
|
1883
|
+
"""Deserializes the LogParamResponse from a dictionary."""
|
|
1884
|
+
return cls()
|
|
1885
|
+
|
|
1886
|
+
|
|
1677
1887
|
@dataclass
|
|
1678
1888
|
class Metric:
|
|
1679
1889
|
key: Optional[str] = None
|
|
@@ -2481,6 +2691,20 @@ class RestoreExperiment:
|
|
|
2481
2691
|
return cls(experiment_id=d.get('experiment_id', None))
|
|
2482
2692
|
|
|
2483
2693
|
|
|
2694
|
+
@dataclass
|
|
2695
|
+
class RestoreExperimentResponse:
|
|
2696
|
+
|
|
2697
|
+
def as_dict(self) -> dict:
|
|
2698
|
+
"""Serializes the RestoreExperimentResponse into a dictionary suitable for use as a JSON request body."""
|
|
2699
|
+
body = {}
|
|
2700
|
+
return body
|
|
2701
|
+
|
|
2702
|
+
@classmethod
|
|
2703
|
+
def from_dict(cls, d: Dict[str, any]) -> RestoreExperimentResponse:
|
|
2704
|
+
"""Deserializes the RestoreExperimentResponse from a dictionary."""
|
|
2705
|
+
return cls()
|
|
2706
|
+
|
|
2707
|
+
|
|
2484
2708
|
@dataclass
|
|
2485
2709
|
class RestoreRun:
|
|
2486
2710
|
run_id: str
|
|
@@ -2498,6 +2722,20 @@ class RestoreRun:
|
|
|
2498
2722
|
return cls(run_id=d.get('run_id', None))
|
|
2499
2723
|
|
|
2500
2724
|
|
|
2725
|
+
@dataclass
|
|
2726
|
+
class RestoreRunResponse:
|
|
2727
|
+
|
|
2728
|
+
def as_dict(self) -> dict:
|
|
2729
|
+
"""Serializes the RestoreRunResponse into a dictionary suitable for use as a JSON request body."""
|
|
2730
|
+
body = {}
|
|
2731
|
+
return body
|
|
2732
|
+
|
|
2733
|
+
@classmethod
|
|
2734
|
+
def from_dict(cls, d: Dict[str, any]) -> RestoreRunResponse:
|
|
2735
|
+
"""Deserializes the RestoreRunResponse from a dictionary."""
|
|
2736
|
+
return cls()
|
|
2737
|
+
|
|
2738
|
+
|
|
2501
2739
|
@dataclass
|
|
2502
2740
|
class RestoreRuns:
|
|
2503
2741
|
experiment_id: str
|
|
@@ -2936,6 +3174,20 @@ class SetExperimentTag:
|
|
|
2936
3174
|
value=d.get('value', None))
|
|
2937
3175
|
|
|
2938
3176
|
|
|
3177
|
+
@dataclass
|
|
3178
|
+
class SetExperimentTagResponse:
|
|
3179
|
+
|
|
3180
|
+
def as_dict(self) -> dict:
|
|
3181
|
+
"""Serializes the SetExperimentTagResponse into a dictionary suitable for use as a JSON request body."""
|
|
3182
|
+
body = {}
|
|
3183
|
+
return body
|
|
3184
|
+
|
|
3185
|
+
@classmethod
|
|
3186
|
+
def from_dict(cls, d: Dict[str, any]) -> SetExperimentTagResponse:
|
|
3187
|
+
"""Deserializes the SetExperimentTagResponse from a dictionary."""
|
|
3188
|
+
return cls()
|
|
3189
|
+
|
|
3190
|
+
|
|
2939
3191
|
@dataclass
|
|
2940
3192
|
class SetModelTagRequest:
|
|
2941
3193
|
name: str
|
|
@@ -2964,6 +3216,20 @@ class SetModelTagRequest:
|
|
|
2964
3216
|
return cls(key=d.get('key', None), name=d.get('name', None), value=d.get('value', None))
|
|
2965
3217
|
|
|
2966
3218
|
|
|
3219
|
+
@dataclass
|
|
3220
|
+
class SetModelTagResponse:
|
|
3221
|
+
|
|
3222
|
+
def as_dict(self) -> dict:
|
|
3223
|
+
"""Serializes the SetModelTagResponse into a dictionary suitable for use as a JSON request body."""
|
|
3224
|
+
body = {}
|
|
3225
|
+
return body
|
|
3226
|
+
|
|
3227
|
+
@classmethod
|
|
3228
|
+
def from_dict(cls, d: Dict[str, any]) -> SetModelTagResponse:
|
|
3229
|
+
"""Deserializes the SetModelTagResponse from a dictionary."""
|
|
3230
|
+
return cls()
|
|
3231
|
+
|
|
3232
|
+
|
|
2967
3233
|
@dataclass
|
|
2968
3234
|
class SetModelVersionTagRequest:
|
|
2969
3235
|
name: str
|
|
@@ -2999,6 +3265,20 @@ class SetModelVersionTagRequest:
|
|
|
2999
3265
|
version=d.get('version', None))
|
|
3000
3266
|
|
|
3001
3267
|
|
|
3268
|
+
@dataclass
|
|
3269
|
+
class SetModelVersionTagResponse:
|
|
3270
|
+
|
|
3271
|
+
def as_dict(self) -> dict:
|
|
3272
|
+
"""Serializes the SetModelVersionTagResponse into a dictionary suitable for use as a JSON request body."""
|
|
3273
|
+
body = {}
|
|
3274
|
+
return body
|
|
3275
|
+
|
|
3276
|
+
@classmethod
|
|
3277
|
+
def from_dict(cls, d: Dict[str, any]) -> SetModelVersionTagResponse:
|
|
3278
|
+
"""Deserializes the SetModelVersionTagResponse from a dictionary."""
|
|
3279
|
+
return cls()
|
|
3280
|
+
|
|
3281
|
+
|
|
3002
3282
|
@dataclass
|
|
3003
3283
|
class SetTag:
|
|
3004
3284
|
key: str
|
|
@@ -3034,6 +3314,20 @@ class SetTag:
|
|
|
3034
3314
|
value=d.get('value', None))
|
|
3035
3315
|
|
|
3036
3316
|
|
|
3317
|
+
@dataclass
|
|
3318
|
+
class SetTagResponse:
|
|
3319
|
+
|
|
3320
|
+
def as_dict(self) -> dict:
|
|
3321
|
+
"""Serializes the SetTagResponse into a dictionary suitable for use as a JSON request body."""
|
|
3322
|
+
body = {}
|
|
3323
|
+
return body
|
|
3324
|
+
|
|
3325
|
+
@classmethod
|
|
3326
|
+
def from_dict(cls, d: Dict[str, any]) -> SetTagResponse:
|
|
3327
|
+
"""Deserializes the SetTagResponse from a dictionary."""
|
|
3328
|
+
return cls()
|
|
3329
|
+
|
|
3330
|
+
|
|
3037
3331
|
class Stage(Enum):
|
|
3038
3332
|
"""Stage of the model version. Valid values are:
|
|
3039
3333
|
|
|
@@ -3294,6 +3588,20 @@ class UpdateExperiment:
|
|
|
3294
3588
|
return cls(experiment_id=d.get('experiment_id', None), new_name=d.get('new_name', None))
|
|
3295
3589
|
|
|
3296
3590
|
|
|
3591
|
+
@dataclass
|
|
3592
|
+
class UpdateExperimentResponse:
|
|
3593
|
+
|
|
3594
|
+
def as_dict(self) -> dict:
|
|
3595
|
+
"""Serializes the UpdateExperimentResponse into a dictionary suitable for use as a JSON request body."""
|
|
3596
|
+
body = {}
|
|
3597
|
+
return body
|
|
3598
|
+
|
|
3599
|
+
@classmethod
|
|
3600
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateExperimentResponse:
|
|
3601
|
+
"""Deserializes the UpdateExperimentResponse from a dictionary."""
|
|
3602
|
+
return cls()
|
|
3603
|
+
|
|
3604
|
+
|
|
3297
3605
|
@dataclass
|
|
3298
3606
|
class UpdateModelRequest:
|
|
3299
3607
|
name: str
|
|
@@ -3315,6 +3623,20 @@ class UpdateModelRequest:
|
|
|
3315
3623
|
return cls(description=d.get('description', None), name=d.get('name', None))
|
|
3316
3624
|
|
|
3317
3625
|
|
|
3626
|
+
@dataclass
|
|
3627
|
+
class UpdateModelResponse:
|
|
3628
|
+
|
|
3629
|
+
def as_dict(self) -> dict:
|
|
3630
|
+
"""Serializes the UpdateModelResponse into a dictionary suitable for use as a JSON request body."""
|
|
3631
|
+
body = {}
|
|
3632
|
+
return body
|
|
3633
|
+
|
|
3634
|
+
@classmethod
|
|
3635
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateModelResponse:
|
|
3636
|
+
"""Deserializes the UpdateModelResponse from a dictionary."""
|
|
3637
|
+
return cls()
|
|
3638
|
+
|
|
3639
|
+
|
|
3318
3640
|
@dataclass
|
|
3319
3641
|
class UpdateModelVersionRequest:
|
|
3320
3642
|
name: str
|
|
@@ -3342,6 +3664,20 @@ class UpdateModelVersionRequest:
|
|
|
3342
3664
|
version=d.get('version', None))
|
|
3343
3665
|
|
|
3344
3666
|
|
|
3667
|
+
@dataclass
|
|
3668
|
+
class UpdateModelVersionResponse:
|
|
3669
|
+
|
|
3670
|
+
def as_dict(self) -> dict:
|
|
3671
|
+
"""Serializes the UpdateModelVersionResponse into a dictionary suitable for use as a JSON request body."""
|
|
3672
|
+
body = {}
|
|
3673
|
+
return body
|
|
3674
|
+
|
|
3675
|
+
@classmethod
|
|
3676
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateModelVersionResponse:
|
|
3677
|
+
"""Deserializes the UpdateModelVersionResponse from a dictionary."""
|
|
3678
|
+
return cls()
|
|
3679
|
+
|
|
3680
|
+
|
|
3345
3681
|
@dataclass
|
|
3346
3682
|
class UpdateRegistryWebhook:
|
|
3347
3683
|
id: str
|
|
@@ -3475,6 +3811,20 @@ class UpdateRunStatus(Enum):
|
|
|
3475
3811
|
SCHEDULED = 'SCHEDULED'
|
|
3476
3812
|
|
|
3477
3813
|
|
|
3814
|
+
@dataclass
|
|
3815
|
+
class UpdateWebhookResponse:
|
|
3816
|
+
|
|
3817
|
+
def as_dict(self) -> dict:
|
|
3818
|
+
"""Serializes the UpdateWebhookResponse into a dictionary suitable for use as a JSON request body."""
|
|
3819
|
+
body = {}
|
|
3820
|
+
return body
|
|
3821
|
+
|
|
3822
|
+
@classmethod
|
|
3823
|
+
def from_dict(cls, d: Dict[str, any]) -> UpdateWebhookResponse:
|
|
3824
|
+
"""Deserializes the UpdateWebhookResponse from a dictionary."""
|
|
3825
|
+
return cls()
|
|
3826
|
+
|
|
3827
|
+
|
|
3478
3828
|
class ExperimentsAPI:
|
|
3479
3829
|
"""Experiments are the primary unit of organization in MLflow; all MLflow runs belong to an experiment. Each
|
|
3480
3830
|
experiment lets you visualize, search, and compare runs, as well as download run artifacts or metadata for
|
|
@@ -3517,6 +3867,7 @@ class ExperimentsAPI:
|
|
|
3517
3867
|
if name is not None: body['name'] = name
|
|
3518
3868
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
3519
3869
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3870
|
+
|
|
3520
3871
|
res = self._api.do('POST', '/api/2.0/mlflow/experiments/create', body=body, headers=headers)
|
|
3521
3872
|
return CreateExperimentResponse.from_dict(res)
|
|
3522
3873
|
|
|
@@ -3550,6 +3901,7 @@ class ExperimentsAPI:
|
|
|
3550
3901
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
3551
3902
|
if user_id is not None: body['user_id'] = user_id
|
|
3552
3903
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3904
|
+
|
|
3553
3905
|
res = self._api.do('POST', '/api/2.0/mlflow/runs/create', body=body, headers=headers)
|
|
3554
3906
|
return CreateRunResponse.from_dict(res)
|
|
3555
3907
|
|
|
@@ -3567,6 +3919,7 @@ class ExperimentsAPI:
|
|
|
3567
3919
|
body = {}
|
|
3568
3920
|
if experiment_id is not None: body['experiment_id'] = experiment_id
|
|
3569
3921
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3922
|
+
|
|
3570
3923
|
self._api.do('POST', '/api/2.0/mlflow/experiments/delete', body=body, headers=headers)
|
|
3571
3924
|
|
|
3572
3925
|
def delete_run(self, run_id: str):
|
|
@@ -3582,6 +3935,7 @@ class ExperimentsAPI:
|
|
|
3582
3935
|
body = {}
|
|
3583
3936
|
if run_id is not None: body['run_id'] = run_id
|
|
3584
3937
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3938
|
+
|
|
3585
3939
|
self._api.do('POST', '/api/2.0/mlflow/runs/delete', body=body, headers=headers)
|
|
3586
3940
|
|
|
3587
3941
|
def delete_runs(self,
|
|
@@ -3611,6 +3965,7 @@ class ExperimentsAPI:
|
|
|
3611
3965
|
if max_runs is not None: body['max_runs'] = max_runs
|
|
3612
3966
|
if max_timestamp_millis is not None: body['max_timestamp_millis'] = max_timestamp_millis
|
|
3613
3967
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3968
|
+
|
|
3614
3969
|
res = self._api.do('POST', '/api/2.0/mlflow/databricks/runs/delete-runs', body=body, headers=headers)
|
|
3615
3970
|
return DeleteRunsResponse.from_dict(res)
|
|
3616
3971
|
|
|
@@ -3631,6 +3986,7 @@ class ExperimentsAPI:
|
|
|
3631
3986
|
if key is not None: body['key'] = key
|
|
3632
3987
|
if run_id is not None: body['run_id'] = run_id
|
|
3633
3988
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
3989
|
+
|
|
3634
3990
|
self._api.do('POST', '/api/2.0/mlflow/runs/delete-tag', body=body, headers=headers)
|
|
3635
3991
|
|
|
3636
3992
|
def get_by_name(self, experiment_name: str) -> GetExperimentResponse:
|
|
@@ -3653,6 +4009,7 @@ class ExperimentsAPI:
|
|
|
3653
4009
|
query = {}
|
|
3654
4010
|
if experiment_name is not None: query['experiment_name'] = experiment_name
|
|
3655
4011
|
headers = {'Accept': 'application/json', }
|
|
4012
|
+
|
|
3656
4013
|
res = self._api.do('GET', '/api/2.0/mlflow/experiments/get-by-name', query=query, headers=headers)
|
|
3657
4014
|
return GetExperimentResponse.from_dict(res)
|
|
3658
4015
|
|
|
@@ -3670,6 +4027,7 @@ class ExperimentsAPI:
|
|
|
3670
4027
|
query = {}
|
|
3671
4028
|
if experiment_id is not None: query['experiment_id'] = experiment_id
|
|
3672
4029
|
headers = {'Accept': 'application/json', }
|
|
4030
|
+
|
|
3673
4031
|
res = self._api.do('GET', '/api/2.0/mlflow/experiments/get', query=query, headers=headers)
|
|
3674
4032
|
return GetExperimentResponse.from_dict(res)
|
|
3675
4033
|
|
|
@@ -3729,6 +4087,7 @@ class ExperimentsAPI:
|
|
|
3729
4087
|
"""
|
|
3730
4088
|
|
|
3731
4089
|
headers = {'Accept': 'application/json', }
|
|
4090
|
+
|
|
3732
4091
|
res = self._api.do('GET',
|
|
3733
4092
|
f'/api/2.0/permissions/experiments/{experiment_id}/permissionLevels',
|
|
3734
4093
|
headers=headers)
|
|
@@ -3746,6 +4105,7 @@ class ExperimentsAPI:
|
|
|
3746
4105
|
"""
|
|
3747
4106
|
|
|
3748
4107
|
headers = {'Accept': 'application/json', }
|
|
4108
|
+
|
|
3749
4109
|
res = self._api.do('GET', f'/api/2.0/permissions/experiments/{experiment_id}', headers=headers)
|
|
3750
4110
|
return ExperimentPermissions.from_dict(res)
|
|
3751
4111
|
|
|
@@ -3770,6 +4130,7 @@ class ExperimentsAPI:
|
|
|
3770
4130
|
if run_id is not None: query['run_id'] = run_id
|
|
3771
4131
|
if run_uuid is not None: query['run_uuid'] = run_uuid
|
|
3772
4132
|
headers = {'Accept': 'application/json', }
|
|
4133
|
+
|
|
3773
4134
|
res = self._api.do('GET', '/api/2.0/mlflow/runs/get', query=query, headers=headers)
|
|
3774
4135
|
return GetRunResponse.from_dict(res)
|
|
3775
4136
|
|
|
@@ -3912,6 +4273,7 @@ class ExperimentsAPI:
|
|
|
3912
4273
|
if run_id is not None: body['run_id'] = run_id
|
|
3913
4274
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
3914
4275
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4276
|
+
|
|
3915
4277
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-batch', body=body, headers=headers)
|
|
3916
4278
|
|
|
3917
4279
|
def log_inputs(self, *, datasets: Optional[List[DatasetInput]] = None, run_id: Optional[str] = None):
|
|
@@ -3930,6 +4292,7 @@ class ExperimentsAPI:
|
|
|
3930
4292
|
if datasets is not None: body['datasets'] = [v.as_dict() for v in datasets]
|
|
3931
4293
|
if run_id is not None: body['run_id'] = run_id
|
|
3932
4294
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4295
|
+
|
|
3933
4296
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-inputs', body=body, headers=headers)
|
|
3934
4297
|
|
|
3935
4298
|
def log_metric(self,
|
|
@@ -3970,6 +4333,7 @@ class ExperimentsAPI:
|
|
|
3970
4333
|
if timestamp is not None: body['timestamp'] = timestamp
|
|
3971
4334
|
if value is not None: body['value'] = value
|
|
3972
4335
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4336
|
+
|
|
3973
4337
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-metric', body=body, headers=headers)
|
|
3974
4338
|
|
|
3975
4339
|
def log_model(self, *, model_json: Optional[str] = None, run_id: Optional[str] = None):
|
|
@@ -3988,6 +4352,7 @@ class ExperimentsAPI:
|
|
|
3988
4352
|
if model_json is not None: body['model_json'] = model_json
|
|
3989
4353
|
if run_id is not None: body['run_id'] = run_id
|
|
3990
4354
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4355
|
+
|
|
3991
4356
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-model', body=body, headers=headers)
|
|
3992
4357
|
|
|
3993
4358
|
def log_param(self,
|
|
@@ -4020,6 +4385,7 @@ class ExperimentsAPI:
|
|
|
4020
4385
|
if run_uuid is not None: body['run_uuid'] = run_uuid
|
|
4021
4386
|
if value is not None: body['value'] = value
|
|
4022
4387
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4388
|
+
|
|
4023
4389
|
self._api.do('POST', '/api/2.0/mlflow/runs/log-parameter', body=body, headers=headers)
|
|
4024
4390
|
|
|
4025
4391
|
def restore_experiment(self, experiment_id: str):
|
|
@@ -4039,6 +4405,7 @@ class ExperimentsAPI:
|
|
|
4039
4405
|
body = {}
|
|
4040
4406
|
if experiment_id is not None: body['experiment_id'] = experiment_id
|
|
4041
4407
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4408
|
+
|
|
4042
4409
|
self._api.do('POST', '/api/2.0/mlflow/experiments/restore', body=body, headers=headers)
|
|
4043
4410
|
|
|
4044
4411
|
def restore_run(self, run_id: str):
|
|
@@ -4054,6 +4421,7 @@ class ExperimentsAPI:
|
|
|
4054
4421
|
body = {}
|
|
4055
4422
|
if run_id is not None: body['run_id'] = run_id
|
|
4056
4423
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4424
|
+
|
|
4057
4425
|
self._api.do('POST', '/api/2.0/mlflow/runs/restore', body=body, headers=headers)
|
|
4058
4426
|
|
|
4059
4427
|
def restore_runs(self,
|
|
@@ -4083,6 +4451,7 @@ class ExperimentsAPI:
|
|
|
4083
4451
|
if max_runs is not None: body['max_runs'] = max_runs
|
|
4084
4452
|
if min_timestamp_millis is not None: body['min_timestamp_millis'] = min_timestamp_millis
|
|
4085
4453
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4454
|
+
|
|
4086
4455
|
res = self._api.do('POST', '/api/2.0/mlflow/databricks/runs/restore-runs', body=body, headers=headers)
|
|
4087
4456
|
return RestoreRunsResponse.from_dict(res)
|
|
4088
4457
|
|
|
@@ -4210,6 +4579,7 @@ class ExperimentsAPI:
|
|
|
4210
4579
|
if key is not None: body['key'] = key
|
|
4211
4580
|
if value is not None: body['value'] = value
|
|
4212
4581
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4582
|
+
|
|
4213
4583
|
self._api.do('POST', '/api/2.0/mlflow/experiments/set-experiment-tag', body=body, headers=headers)
|
|
4214
4584
|
|
|
4215
4585
|
def set_permissions(
|
|
@@ -4232,6 +4602,7 @@ class ExperimentsAPI:
|
|
|
4232
4602
|
if access_control_list is not None:
|
|
4233
4603
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
4234
4604
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4605
|
+
|
|
4235
4606
|
res = self._api.do('PUT',
|
|
4236
4607
|
f'/api/2.0/permissions/experiments/{experiment_id}',
|
|
4237
4608
|
body=body,
|
|
@@ -4263,6 +4634,7 @@ class ExperimentsAPI:
|
|
|
4263
4634
|
if run_uuid is not None: body['run_uuid'] = run_uuid
|
|
4264
4635
|
if value is not None: body['value'] = value
|
|
4265
4636
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4637
|
+
|
|
4266
4638
|
self._api.do('POST', '/api/2.0/mlflow/runs/set-tag', body=body, headers=headers)
|
|
4267
4639
|
|
|
4268
4640
|
def update_experiment(self, experiment_id: str, *, new_name: Optional[str] = None):
|
|
@@ -4281,6 +4653,7 @@ class ExperimentsAPI:
|
|
|
4281
4653
|
if experiment_id is not None: body['experiment_id'] = experiment_id
|
|
4282
4654
|
if new_name is not None: body['new_name'] = new_name
|
|
4283
4655
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4656
|
+
|
|
4284
4657
|
self._api.do('POST', '/api/2.0/mlflow/experiments/update', body=body, headers=headers)
|
|
4285
4658
|
|
|
4286
4659
|
def update_permissions(
|
|
@@ -4303,6 +4676,7 @@ class ExperimentsAPI:
|
|
|
4303
4676
|
if access_control_list is not None:
|
|
4304
4677
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
4305
4678
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4679
|
+
|
|
4306
4680
|
res = self._api.do('PATCH',
|
|
4307
4681
|
f'/api/2.0/permissions/experiments/{experiment_id}',
|
|
4308
4682
|
body=body,
|
|
@@ -4337,6 +4711,7 @@ class ExperimentsAPI:
|
|
|
4337
4711
|
if run_uuid is not None: body['run_uuid'] = run_uuid
|
|
4338
4712
|
if status is not None: body['status'] = status.value
|
|
4339
4713
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4714
|
+
|
|
4340
4715
|
res = self._api.do('POST', '/api/2.0/mlflow/runs/update', body=body, headers=headers)
|
|
4341
4716
|
return UpdateRunResponse.from_dict(res)
|
|
4342
4717
|
|
|
@@ -4393,6 +4768,7 @@ class ModelRegistryAPI:
|
|
|
4393
4768
|
if stage is not None: body['stage'] = stage.value
|
|
4394
4769
|
if version is not None: body['version'] = version
|
|
4395
4770
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4771
|
+
|
|
4396
4772
|
res = self._api.do('POST', '/api/2.0/mlflow/transition-requests/approve', body=body, headers=headers)
|
|
4397
4773
|
return ApproveTransitionRequestResponse.from_dict(res)
|
|
4398
4774
|
|
|
@@ -4416,6 +4792,7 @@ class ModelRegistryAPI:
|
|
|
4416
4792
|
if name is not None: body['name'] = name
|
|
4417
4793
|
if version is not None: body['version'] = version
|
|
4418
4794
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4795
|
+
|
|
4419
4796
|
res = self._api.do('POST', '/api/2.0/mlflow/comments/create', body=body, headers=headers)
|
|
4420
4797
|
return CreateCommentResponse.from_dict(res)
|
|
4421
4798
|
|
|
@@ -4444,6 +4821,7 @@ class ModelRegistryAPI:
|
|
|
4444
4821
|
if name is not None: body['name'] = name
|
|
4445
4822
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
4446
4823
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4824
|
+
|
|
4447
4825
|
res = self._api.do('POST', '/api/2.0/mlflow/registered-models/create', body=body, headers=headers)
|
|
4448
4826
|
return CreateModelResponse.from_dict(res)
|
|
4449
4827
|
|
|
@@ -4484,6 +4862,7 @@ class ModelRegistryAPI:
|
|
|
4484
4862
|
if source is not None: body['source'] = source
|
|
4485
4863
|
if tags is not None: body['tags'] = [v.as_dict() for v in tags]
|
|
4486
4864
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4865
|
+
|
|
4487
4866
|
res = self._api.do('POST', '/api/2.0/mlflow/model-versions/create', body=body, headers=headers)
|
|
4488
4867
|
return CreateModelVersionResponse.from_dict(res)
|
|
4489
4868
|
|
|
@@ -4522,6 +4901,7 @@ class ModelRegistryAPI:
|
|
|
4522
4901
|
if stage is not None: body['stage'] = stage.value
|
|
4523
4902
|
if version is not None: body['version'] = version
|
|
4524
4903
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4904
|
+
|
|
4525
4905
|
res = self._api.do('POST', '/api/2.0/mlflow/transition-requests/create', body=body, headers=headers)
|
|
4526
4906
|
return CreateTransitionRequestResponse.from_dict(res)
|
|
4527
4907
|
|
|
@@ -4593,6 +4973,7 @@ class ModelRegistryAPI:
|
|
|
4593
4973
|
if model_name is not None: body['model_name'] = model_name
|
|
4594
4974
|
if status is not None: body['status'] = status.value
|
|
4595
4975
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
4976
|
+
|
|
4596
4977
|
res = self._api.do('POST', '/api/2.0/mlflow/registry-webhooks/create', body=body, headers=headers)
|
|
4597
4978
|
return CreateWebhookResponse.from_dict(res)
|
|
4598
4979
|
|
|
@@ -4609,6 +4990,7 @@ class ModelRegistryAPI:
|
|
|
4609
4990
|
query = {}
|
|
4610
4991
|
if id is not None: query['id'] = id
|
|
4611
4992
|
headers = {'Accept': 'application/json', }
|
|
4993
|
+
|
|
4612
4994
|
self._api.do('DELETE', '/api/2.0/mlflow/comments/delete', query=query, headers=headers)
|
|
4613
4995
|
|
|
4614
4996
|
def delete_model(self, name: str):
|
|
@@ -4625,6 +5007,7 @@ class ModelRegistryAPI:
|
|
|
4625
5007
|
query = {}
|
|
4626
5008
|
if name is not None: query['name'] = name
|
|
4627
5009
|
headers = {'Accept': 'application/json', }
|
|
5010
|
+
|
|
4628
5011
|
self._api.do('DELETE', '/api/2.0/mlflow/registered-models/delete', query=query, headers=headers)
|
|
4629
5012
|
|
|
4630
5013
|
def delete_model_tag(self, name: str, key: str):
|
|
@@ -4645,6 +5028,7 @@ class ModelRegistryAPI:
|
|
|
4645
5028
|
if key is not None: query['key'] = key
|
|
4646
5029
|
if name is not None: query['name'] = name
|
|
4647
5030
|
headers = {'Accept': 'application/json', }
|
|
5031
|
+
|
|
4648
5032
|
self._api.do('DELETE', '/api/2.0/mlflow/registered-models/delete-tag', query=query, headers=headers)
|
|
4649
5033
|
|
|
4650
5034
|
def delete_model_version(self, name: str, version: str):
|
|
@@ -4664,6 +5048,7 @@ class ModelRegistryAPI:
|
|
|
4664
5048
|
if name is not None: query['name'] = name
|
|
4665
5049
|
if version is not None: query['version'] = version
|
|
4666
5050
|
headers = {'Accept': 'application/json', }
|
|
5051
|
+
|
|
4667
5052
|
self._api.do('DELETE', '/api/2.0/mlflow/model-versions/delete', query=query, headers=headers)
|
|
4668
5053
|
|
|
4669
5054
|
def delete_model_version_tag(self, name: str, version: str, key: str):
|
|
@@ -4687,6 +5072,7 @@ class ModelRegistryAPI:
|
|
|
4687
5072
|
if name is not None: query['name'] = name
|
|
4688
5073
|
if version is not None: query['version'] = version
|
|
4689
5074
|
headers = {'Accept': 'application/json', }
|
|
5075
|
+
|
|
4690
5076
|
self._api.do('DELETE', '/api/2.0/mlflow/model-versions/delete-tag', query=query, headers=headers)
|
|
4691
5077
|
|
|
4692
5078
|
def delete_transition_request(self,
|
|
@@ -4730,6 +5116,7 @@ class ModelRegistryAPI:
|
|
|
4730
5116
|
if stage is not None: query['stage'] = stage.value
|
|
4731
5117
|
if version is not None: query['version'] = version
|
|
4732
5118
|
headers = {'Accept': 'application/json', }
|
|
5119
|
+
|
|
4733
5120
|
self._api.do('DELETE', '/api/2.0/mlflow/transition-requests/delete', query=query, headers=headers)
|
|
4734
5121
|
|
|
4735
5122
|
def delete_webhook(self, *, id: Optional[str] = None):
|
|
@@ -4748,6 +5135,7 @@ class ModelRegistryAPI:
|
|
|
4748
5135
|
query = {}
|
|
4749
5136
|
if id is not None: query['id'] = id
|
|
4750
5137
|
headers = {'Accept': 'application/json', }
|
|
5138
|
+
|
|
4751
5139
|
self._api.do('DELETE', '/api/2.0/mlflow/registry-webhooks/delete', query=query, headers=headers)
|
|
4752
5140
|
|
|
4753
5141
|
def get_latest_versions(self, name: str, *, stages: Optional[List[str]] = None) -> Iterator[ModelVersion]:
|
|
@@ -4766,6 +5154,7 @@ class ModelRegistryAPI:
|
|
|
4766
5154
|
if name is not None: body['name'] = name
|
|
4767
5155
|
if stages is not None: body['stages'] = [v for v in stages]
|
|
4768
5156
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5157
|
+
|
|
4769
5158
|
json = self._api.do('POST',
|
|
4770
5159
|
'/api/2.0/mlflow/registered-models/get-latest-versions',
|
|
4771
5160
|
body=body,
|
|
@@ -4791,6 +5180,7 @@ class ModelRegistryAPI:
|
|
|
4791
5180
|
query = {}
|
|
4792
5181
|
if name is not None: query['name'] = name
|
|
4793
5182
|
headers = {'Accept': 'application/json', }
|
|
5183
|
+
|
|
4794
5184
|
res = self._api.do('GET',
|
|
4795
5185
|
'/api/2.0/mlflow/databricks/registered-models/get',
|
|
4796
5186
|
query=query,
|
|
@@ -4814,6 +5204,7 @@ class ModelRegistryAPI:
|
|
|
4814
5204
|
if name is not None: query['name'] = name
|
|
4815
5205
|
if version is not None: query['version'] = version
|
|
4816
5206
|
headers = {'Accept': 'application/json', }
|
|
5207
|
+
|
|
4817
5208
|
res = self._api.do('GET', '/api/2.0/mlflow/model-versions/get', query=query, headers=headers)
|
|
4818
5209
|
return GetModelVersionResponse.from_dict(res)
|
|
4819
5210
|
|
|
@@ -4834,6 +5225,7 @@ class ModelRegistryAPI:
|
|
|
4834
5225
|
if name is not None: query['name'] = name
|
|
4835
5226
|
if version is not None: query['version'] = version
|
|
4836
5227
|
headers = {'Accept': 'application/json', }
|
|
5228
|
+
|
|
4837
5229
|
res = self._api.do('GET',
|
|
4838
5230
|
'/api/2.0/mlflow/model-versions/get-download-uri',
|
|
4839
5231
|
query=query,
|
|
@@ -4852,6 +5244,7 @@ class ModelRegistryAPI:
|
|
|
4852
5244
|
"""
|
|
4853
5245
|
|
|
4854
5246
|
headers = {'Accept': 'application/json', }
|
|
5247
|
+
|
|
4855
5248
|
res = self._api.do('GET',
|
|
4856
5249
|
f'/api/2.0/permissions/registered-models/{registered_model_id}/permissionLevels',
|
|
4857
5250
|
headers=headers)
|
|
@@ -4870,6 +5263,7 @@ class ModelRegistryAPI:
|
|
|
4870
5263
|
"""
|
|
4871
5264
|
|
|
4872
5265
|
headers = {'Accept': 'application/json', }
|
|
5266
|
+
|
|
4873
5267
|
res = self._api.do('GET',
|
|
4874
5268
|
f'/api/2.0/permissions/registered-models/{registered_model_id}',
|
|
4875
5269
|
headers=headers)
|
|
@@ -4922,6 +5316,7 @@ class ModelRegistryAPI:
|
|
|
4922
5316
|
if name is not None: query['name'] = name
|
|
4923
5317
|
if version is not None: query['version'] = version
|
|
4924
5318
|
headers = {'Accept': 'application/json', }
|
|
5319
|
+
|
|
4925
5320
|
json = self._api.do('GET', '/api/2.0/mlflow/transition-requests/list', query=query, headers=headers)
|
|
4926
5321
|
parsed = ListTransitionRequestsResponse.from_dict(json).requests
|
|
4927
5322
|
return parsed if parsed is not None else []
|
|
@@ -4999,6 +5394,7 @@ class ModelRegistryAPI:
|
|
|
4999
5394
|
if stage is not None: body['stage'] = stage.value
|
|
5000
5395
|
if version is not None: body['version'] = version
|
|
5001
5396
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5397
|
+
|
|
5002
5398
|
res = self._api.do('POST', '/api/2.0/mlflow/transition-requests/reject', body=body, headers=headers)
|
|
5003
5399
|
return RejectTransitionRequestResponse.from_dict(res)
|
|
5004
5400
|
|
|
@@ -5018,6 +5414,7 @@ class ModelRegistryAPI:
|
|
|
5018
5414
|
if name is not None: body['name'] = name
|
|
5019
5415
|
if new_name is not None: body['new_name'] = new_name
|
|
5020
5416
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5417
|
+
|
|
5021
5418
|
res = self._api.do('POST', '/api/2.0/mlflow/registered-models/rename', body=body, headers=headers)
|
|
5022
5419
|
return RenameModelResponse.from_dict(res)
|
|
5023
5420
|
|
|
@@ -5129,6 +5526,7 @@ class ModelRegistryAPI:
|
|
|
5129
5526
|
if name is not None: body['name'] = name
|
|
5130
5527
|
if value is not None: body['value'] = value
|
|
5131
5528
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5529
|
+
|
|
5132
5530
|
self._api.do('POST', '/api/2.0/mlflow/registered-models/set-tag', body=body, headers=headers)
|
|
5133
5531
|
|
|
5134
5532
|
def set_model_version_tag(self, name: str, version: str, key: str, value: str):
|
|
@@ -5156,6 +5554,7 @@ class ModelRegistryAPI:
|
|
|
5156
5554
|
if value is not None: body['value'] = value
|
|
5157
5555
|
if version is not None: body['version'] = version
|
|
5158
5556
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5557
|
+
|
|
5159
5558
|
self._api.do('POST', '/api/2.0/mlflow/model-versions/set-tag', body=body, headers=headers)
|
|
5160
5559
|
|
|
5161
5560
|
def set_permissions(
|
|
@@ -5179,6 +5578,7 @@ class ModelRegistryAPI:
|
|
|
5179
5578
|
if access_control_list is not None:
|
|
5180
5579
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
5181
5580
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5581
|
+
|
|
5182
5582
|
res = self._api.do('PUT',
|
|
5183
5583
|
f'/api/2.0/permissions/registered-models/{registered_model_id}',
|
|
5184
5584
|
body=body,
|
|
@@ -5207,6 +5607,7 @@ class ModelRegistryAPI:
|
|
|
5207
5607
|
if event is not None: body['event'] = event.value
|
|
5208
5608
|
if id is not None: body['id'] = id
|
|
5209
5609
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5610
|
+
|
|
5210
5611
|
res = self._api.do('POST', '/api/2.0/mlflow/registry-webhooks/test', body=body, headers=headers)
|
|
5211
5612
|
return TestRegistryWebhookResponse.from_dict(res)
|
|
5212
5613
|
|
|
@@ -5253,6 +5654,7 @@ class ModelRegistryAPI:
|
|
|
5253
5654
|
if stage is not None: body['stage'] = stage.value
|
|
5254
5655
|
if version is not None: body['version'] = version
|
|
5255
5656
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5657
|
+
|
|
5256
5658
|
res = self._api.do('POST',
|
|
5257
5659
|
'/api/2.0/mlflow/databricks/model-versions/transition-stage',
|
|
5258
5660
|
body=body,
|
|
@@ -5275,6 +5677,7 @@ class ModelRegistryAPI:
|
|
|
5275
5677
|
if comment is not None: body['comment'] = comment
|
|
5276
5678
|
if id is not None: body['id'] = id
|
|
5277
5679
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5680
|
+
|
|
5278
5681
|
res = self._api.do('PATCH', '/api/2.0/mlflow/comments/update', body=body, headers=headers)
|
|
5279
5682
|
return UpdateCommentResponse.from_dict(res)
|
|
5280
5683
|
|
|
@@ -5294,6 +5697,7 @@ class ModelRegistryAPI:
|
|
|
5294
5697
|
if description is not None: body['description'] = description
|
|
5295
5698
|
if name is not None: body['name'] = name
|
|
5296
5699
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5700
|
+
|
|
5297
5701
|
self._api.do('PATCH', '/api/2.0/mlflow/registered-models/update', body=body, headers=headers)
|
|
5298
5702
|
|
|
5299
5703
|
def update_model_version(self, name: str, version: str, *, description: Optional[str] = None):
|
|
@@ -5315,6 +5719,7 @@ class ModelRegistryAPI:
|
|
|
5315
5719
|
if name is not None: body['name'] = name
|
|
5316
5720
|
if version is not None: body['version'] = version
|
|
5317
5721
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5722
|
+
|
|
5318
5723
|
self._api.do('PATCH', '/api/2.0/mlflow/model-versions/update', body=body, headers=headers)
|
|
5319
5724
|
|
|
5320
5725
|
def update_permissions(
|
|
@@ -5338,6 +5743,7 @@ class ModelRegistryAPI:
|
|
|
5338
5743
|
if access_control_list is not None:
|
|
5339
5744
|
body['access_control_list'] = [v.as_dict() for v in access_control_list]
|
|
5340
5745
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5746
|
+
|
|
5341
5747
|
res = self._api.do('PATCH',
|
|
5342
5748
|
f'/api/2.0/permissions/registered-models/{registered_model_id}',
|
|
5343
5749
|
body=body,
|
|
@@ -5412,4 +5818,5 @@ class ModelRegistryAPI:
|
|
|
5412
5818
|
if job_spec is not None: body['job_spec'] = job_spec.as_dict()
|
|
5413
5819
|
if status is not None: body['status'] = status.value
|
|
5414
5820
|
headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
|
|
5821
|
+
|
|
5415
5822
|
self._api.do('PATCH', '/api/2.0/mlflow/registry-webhooks/update', body=body, headers=headers)
|