databricks-sdk 0.56.0__py3-none-any.whl → 0.57.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 (31) hide show
  1. databricks/sdk/__init__.py +15 -9
  2. databricks/sdk/service/aibuilder.py +157 -16
  3. databricks/sdk/service/apps.py +14 -42
  4. databricks/sdk/service/billing.py +17 -51
  5. databricks/sdk/service/catalog.py +198 -399
  6. databricks/sdk/service/cleanrooms.py +11 -33
  7. databricks/sdk/service/compute.py +63 -189
  8. databricks/sdk/service/dashboards.py +21 -63
  9. databricks/sdk/service/database.py +45 -30
  10. databricks/sdk/service/files.py +18 -54
  11. databricks/sdk/service/iam.py +55 -165
  12. databricks/sdk/service/jobs.py +232 -85
  13. databricks/sdk/service/marketplace.py +46 -146
  14. databricks/sdk/service/ml.py +455 -216
  15. databricks/sdk/service/oauth2.py +17 -45
  16. databricks/sdk/service/pipelines.py +81 -40
  17. databricks/sdk/service/provisioning.py +30 -90
  18. databricks/sdk/service/qualitymonitorv2.py +5 -15
  19. databricks/sdk/service/serving.py +30 -42
  20. databricks/sdk/service/settings.py +103 -314
  21. databricks/sdk/service/sharing.py +30 -86
  22. databricks/sdk/service/sql.py +74 -184
  23. databricks/sdk/service/vectorsearch.py +13 -43
  24. databricks/sdk/service/workspace.py +35 -105
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/METADATA +1 -1
  27. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/RECORD +31 -31
  28. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/WHEEL +0 -0
  29. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/LICENSE +0 -0
  30. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/NOTICE +0 -0
  31. {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.57.0.dist-info}/top_level.txt +0 -0
@@ -1502,6 +1502,24 @@ class DeleteModelVersionTagResponse:
1502
1502
  return cls()
1503
1503
 
1504
1504
 
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
+
1505
1523
  @dataclass
1506
1524
  class DeleteRun:
1507
1525
  run_id: str
@@ -2875,6 +2893,41 @@ class ListModelsResponse:
2875
2893
  )
2876
2894
 
2877
2895
 
2896
+ @dataclass
2897
+ class ListOnlineStoresResponse:
2898
+ next_page_token: Optional[str] = None
2899
+ """Pagination token to request the next page of results for this query."""
2900
+
2901
+ online_stores: Optional[List[OnlineStore]] = None
2902
+ """List of online stores."""
2903
+
2904
+ def as_dict(self) -> dict:
2905
+ """Serializes the ListOnlineStoresResponse into a dictionary suitable for use as a JSON request body."""
2906
+ body = {}
2907
+ if self.next_page_token is not None:
2908
+ body["next_page_token"] = self.next_page_token
2909
+ if self.online_stores:
2910
+ body["online_stores"] = [v.as_dict() for v in self.online_stores]
2911
+ return body
2912
+
2913
+ def as_shallow_dict(self) -> dict:
2914
+ """Serializes the ListOnlineStoresResponse into a shallow dictionary of its immediate attributes."""
2915
+ body = {}
2916
+ if self.next_page_token is not None:
2917
+ body["next_page_token"] = self.next_page_token
2918
+ if self.online_stores:
2919
+ body["online_stores"] = self.online_stores
2920
+ return body
2921
+
2922
+ @classmethod
2923
+ def from_dict(cls, d: Dict[str, Any]) -> ListOnlineStoresResponse:
2924
+ """Deserializes the ListOnlineStoresResponse from a dictionary."""
2925
+ return cls(
2926
+ next_page_token=d.get("next_page_token", None),
2927
+ online_stores=_repeated_dict(d, "online_stores", OnlineStore),
2928
+ )
2929
+
2930
+
2878
2931
  @dataclass
2879
2932
  class ListRegistryWebhooks:
2880
2933
  next_page_token: Optional[str] = None
@@ -4324,6 +4377,77 @@ class ModelVersionTag:
4324
4377
  return cls(key=d.get("key", None), value=d.get("value", None))
4325
4378
 
4326
4379
 
4380
+ @dataclass
4381
+ class OnlineStore:
4382
+ """An OnlineStore is a logical database instance that stores and serves features online."""
4383
+
4384
+ name: str
4385
+ """The name of the online store. This is the unique identifier for the online store."""
4386
+
4387
+ capacity: Optional[str] = None
4388
+ """The capacity of the online store. Valid values are "CU_1", "CU_2", "CU_4", "CU_8"."""
4389
+
4390
+ creation_time: Optional[str] = None
4391
+ """The timestamp when the online store was created."""
4392
+
4393
+ creator: Optional[str] = None
4394
+ """The email of the creator of the online store."""
4395
+
4396
+ state: Optional[OnlineStoreState] = None
4397
+ """The current state of the online store."""
4398
+
4399
+ def as_dict(self) -> dict:
4400
+ """Serializes the OnlineStore into a dictionary suitable for use as a JSON request body."""
4401
+ body = {}
4402
+ if self.capacity is not None:
4403
+ body["capacity"] = self.capacity
4404
+ if self.creation_time is not None:
4405
+ body["creation_time"] = self.creation_time
4406
+ if self.creator is not None:
4407
+ body["creator"] = self.creator
4408
+ if self.name is not None:
4409
+ body["name"] = self.name
4410
+ if self.state is not None:
4411
+ body["state"] = self.state.value
4412
+ return body
4413
+
4414
+ def as_shallow_dict(self) -> dict:
4415
+ """Serializes the OnlineStore into a shallow dictionary of its immediate attributes."""
4416
+ body = {}
4417
+ if self.capacity is not None:
4418
+ body["capacity"] = self.capacity
4419
+ if self.creation_time is not None:
4420
+ body["creation_time"] = self.creation_time
4421
+ if self.creator is not None:
4422
+ body["creator"] = self.creator
4423
+ if self.name is not None:
4424
+ body["name"] = self.name
4425
+ if self.state is not None:
4426
+ body["state"] = self.state
4427
+ return body
4428
+
4429
+ @classmethod
4430
+ def from_dict(cls, d: Dict[str, Any]) -> OnlineStore:
4431
+ """Deserializes the OnlineStore from a dictionary."""
4432
+ return cls(
4433
+ capacity=d.get("capacity", None),
4434
+ creation_time=d.get("creation_time", None),
4435
+ creator=d.get("creator", None),
4436
+ name=d.get("name", None),
4437
+ state=_enum(d, "state", OnlineStoreState),
4438
+ )
4439
+
4440
+
4441
+ class OnlineStoreState(Enum):
4442
+
4443
+ AVAILABLE = "AVAILABLE"
4444
+ DELETING = "DELETING"
4445
+ FAILING_OVER = "FAILING_OVER"
4446
+ STARTING = "STARTING"
4447
+ STOPPED = "STOPPED"
4448
+ UPDATING = "UPDATING"
4449
+
4450
+
4327
4451
  @dataclass
4328
4452
  class Param:
4329
4453
  """Param associated with a run."""
@@ -4369,6 +4493,124 @@ class PermissionLevel(Enum):
4369
4493
  CAN_READ = "CAN_READ"
4370
4494
 
4371
4495
 
4496
+ @dataclass
4497
+ class PublishSpec:
4498
+ online_store: str
4499
+ """The name of the target online store."""
4500
+
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."""
4504
+
4505
+ publish_mode: Optional[PublishSpecPublishMode] = None
4506
+ """The publish mode of the pipeline that syncs the online table with the source table. Defaults to
4507
+ TRIGGERED if not specified. All publish modes require the source table to have Change Data Feed
4508
+ (CDF) enabled."""
4509
+
4510
+ def as_dict(self) -> dict:
4511
+ """Serializes the PublishSpec into a dictionary suitable for use as a JSON request body."""
4512
+ body = {}
4513
+ if self.online_store is not None:
4514
+ body["online_store"] = self.online_store
4515
+ if self.online_table_name is not None:
4516
+ body["online_table_name"] = self.online_table_name
4517
+ if self.publish_mode is not None:
4518
+ body["publish_mode"] = self.publish_mode.value
4519
+ return body
4520
+
4521
+ def as_shallow_dict(self) -> dict:
4522
+ """Serializes the PublishSpec into a shallow dictionary of its immediate attributes."""
4523
+ body = {}
4524
+ if self.online_store is not None:
4525
+ body["online_store"] = self.online_store
4526
+ if self.online_table_name is not None:
4527
+ body["online_table_name"] = self.online_table_name
4528
+ if self.publish_mode is not None:
4529
+ body["publish_mode"] = self.publish_mode
4530
+ return body
4531
+
4532
+ @classmethod
4533
+ def from_dict(cls, d: Dict[str, Any]) -> PublishSpec:
4534
+ """Deserializes the PublishSpec from a dictionary."""
4535
+ return cls(
4536
+ online_store=d.get("online_store", None),
4537
+ online_table_name=d.get("online_table_name", None),
4538
+ publish_mode=_enum(d, "publish_mode", PublishSpecPublishMode),
4539
+ )
4540
+
4541
+
4542
+ class PublishSpecPublishMode(Enum):
4543
+
4544
+ CONTINUOUS = "CONTINUOUS"
4545
+ TRIGGERED = "TRIGGERED"
4546
+
4547
+
4548
+ @dataclass
4549
+ class PublishTableRequest:
4550
+ publish_spec: PublishSpec
4551
+ """The specification for publishing the online table from the source table."""
4552
+
4553
+ source_table_name: Optional[str] = None
4554
+ """The full three-part (catalog, schema, table) name of the source table."""
4555
+
4556
+ def as_dict(self) -> dict:
4557
+ """Serializes the PublishTableRequest into a dictionary suitable for use as a JSON request body."""
4558
+ body = {}
4559
+ if self.publish_spec:
4560
+ body["publish_spec"] = self.publish_spec.as_dict()
4561
+ if self.source_table_name is not None:
4562
+ body["source_table_name"] = self.source_table_name
4563
+ return body
4564
+
4565
+ def as_shallow_dict(self) -> dict:
4566
+ """Serializes the PublishTableRequest into a shallow dictionary of its immediate attributes."""
4567
+ body = {}
4568
+ if self.publish_spec:
4569
+ body["publish_spec"] = self.publish_spec
4570
+ if self.source_table_name is not None:
4571
+ body["source_table_name"] = self.source_table_name
4572
+ return body
4573
+
4574
+ @classmethod
4575
+ def from_dict(cls, d: Dict[str, Any]) -> PublishTableRequest:
4576
+ """Deserializes the PublishTableRequest from a dictionary."""
4577
+ return cls(
4578
+ publish_spec=_from_dict(d, "publish_spec", PublishSpec), source_table_name=d.get("source_table_name", None)
4579
+ )
4580
+
4581
+
4582
+ @dataclass
4583
+ class PublishTableResponse:
4584
+ online_table_name: Optional[str] = None
4585
+ """The full three-part (catalog, schema, table) name of the online table."""
4586
+
4587
+ pipeline_id: Optional[str] = None
4588
+ """The ID of the pipeline that syncs the online table with the source table."""
4589
+
4590
+ def as_dict(self) -> dict:
4591
+ """Serializes the PublishTableResponse into a dictionary suitable for use as a JSON request body."""
4592
+ body = {}
4593
+ if self.online_table_name is not None:
4594
+ body["online_table_name"] = self.online_table_name
4595
+ if self.pipeline_id is not None:
4596
+ body["pipeline_id"] = self.pipeline_id
4597
+ return body
4598
+
4599
+ def as_shallow_dict(self) -> dict:
4600
+ """Serializes the PublishTableResponse into a shallow dictionary of its immediate attributes."""
4601
+ body = {}
4602
+ if self.online_table_name is not None:
4603
+ body["online_table_name"] = self.online_table_name
4604
+ if self.pipeline_id is not None:
4605
+ body["pipeline_id"] = self.pipeline_id
4606
+ return body
4607
+
4608
+ @classmethod
4609
+ def from_dict(cls, d: Dict[str, Any]) -> PublishTableResponse:
4610
+ """Deserializes the PublishTableResponse from a dictionary."""
4611
+ return cls(online_table_name=d.get("online_table_name", None), pipeline_id=d.get("pipeline_id", None))
4612
+
4613
+
4372
4614
  @dataclass
4373
4615
  class RegisteredModelAccessControlRequest:
4374
4616
  group_name: Optional[str] = None
@@ -6869,9 +7111,7 @@ class ExperimentsAPI:
6869
7111
  def create_experiment(
6870
7112
  self, name: str, *, artifact_location: Optional[str] = None, tags: Optional[List[ExperimentTag]] = None
6871
7113
  ) -> CreateExperimentResponse:
6872
- """Create experiment.
6873
-
6874
- Creates an experiment with a name. Returns the ID of the newly created experiment. Validates that
7114
+ """Creates an experiment with a name. Returns the ID of the newly created experiment. Validates that
6875
7115
  another experiment with the same name does not already exist and fails if another experiment with the
6876
7116
  same name already exists.
6877
7117
 
@@ -6962,9 +7202,7 @@ class ExperimentsAPI:
6962
7202
  tags: Optional[List[RunTag]] = None,
6963
7203
  user_id: Optional[str] = None,
6964
7204
  ) -> CreateRunResponse:
6965
- """Create a run.
6966
-
6967
- Creates a new run within an experiment. A run is usually a single execution of a machine learning or
7205
+ """Creates a new run within an experiment. A run is usually a single execution of a machine learning or
6968
7206
  data ETL pipeline. MLflow uses runs to track the `mlflowParam`, `mlflowMetric`, and `mlflowRunTag`
6969
7207
  associated with a single execution.
6970
7208
 
@@ -7002,9 +7240,7 @@ class ExperimentsAPI:
7002
7240
  return CreateRunResponse.from_dict(res)
7003
7241
 
7004
7242
  def delete_experiment(self, experiment_id: str):
7005
- """Delete an experiment.
7006
-
7007
- Marks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the
7243
+ """Marks an experiment and associated metadata, runs, metrics, params, and tags for deletion. If the
7008
7244
  experiment uses FileStore, artifacts associated with the experiment are also deleted.
7009
7245
 
7010
7246
  :param experiment_id: str
@@ -7055,9 +7291,7 @@ class ExperimentsAPI:
7055
7291
  self._api.do("DELETE", f"/api/2.0/mlflow/logged-models/{model_id}/tags/{tag_key}", headers=headers)
7056
7292
 
7057
7293
  def delete_run(self, run_id: str):
7058
- """Delete a run.
7059
-
7060
- Marks a run for deletion.
7294
+ """Marks a run for deletion.
7061
7295
 
7062
7296
  :param run_id: str
7063
7297
  ID of the run to delete.
@@ -7077,9 +7311,7 @@ class ExperimentsAPI:
7077
7311
  def delete_runs(
7078
7312
  self, experiment_id: str, max_timestamp_millis: int, *, max_runs: Optional[int] = None
7079
7313
  ) -> DeleteRunsResponse:
7080
- """Delete runs by creation time.
7081
-
7082
- Bulk delete runs in an experiment that were created prior to or at the specified timestamp. Deletes at
7314
+ """Bulk delete runs in an experiment that were created prior to or at the specified timestamp. Deletes at
7083
7315
  most max_runs per request. To call this API from a Databricks Notebook in Python, you can use the
7084
7316
  client code snippet on
7085
7317
 
@@ -7110,9 +7342,7 @@ class ExperimentsAPI:
7110
7342
  return DeleteRunsResponse.from_dict(res)
7111
7343
 
7112
7344
  def delete_tag(self, run_id: str, key: str):
7113
- """Delete a tag on a run.
7114
-
7115
- Deletes a tag on a run. Tags are run metadata that can be updated during a run and after a run
7345
+ """Deletes a tag on a run. Tags are run metadata that can be updated during a run and after a run
7116
7346
  completes.
7117
7347
 
7118
7348
  :param run_id: str
@@ -7157,9 +7387,7 @@ class ExperimentsAPI:
7157
7387
  return FinalizeLoggedModelResponse.from_dict(res)
7158
7388
 
7159
7389
  def get_by_name(self, experiment_name: str) -> GetExperimentByNameResponse:
7160
- """Get an experiment by name.
7161
-
7162
- Gets metadata for an experiment.
7390
+ """Gets metadata for an experiment.
7163
7391
 
7164
7392
  This endpoint will return deleted experiments, but prefers the active experiment if an active and
7165
7393
  deleted experiment share the same name. If multiple deleted experiments share the same name, the API
@@ -7184,9 +7412,7 @@ class ExperimentsAPI:
7184
7412
  return GetExperimentByNameResponse.from_dict(res)
7185
7413
 
7186
7414
  def get_experiment(self, experiment_id: str) -> GetExperimentResponse:
7187
- """Get an experiment.
7188
-
7189
- Gets metadata for an experiment. This method works on deleted experiments.
7415
+ """Gets metadata for an experiment. This method works on deleted experiments.
7190
7416
 
7191
7417
  :param experiment_id: str
7192
7418
  ID of the associated experiment.
@@ -7213,9 +7439,7 @@ class ExperimentsAPI:
7213
7439
  run_id: Optional[str] = None,
7214
7440
  run_uuid: Optional[str] = None,
7215
7441
  ) -> Iterator[Metric]:
7216
- """Get metric history for a run.
7217
-
7218
- Gets a list of all values for the specified metric for a given run.
7442
+ """Gets a list of all values for the specified metric for a given run.
7219
7443
 
7220
7444
  :param metric_key: str
7221
7445
  Name of the metric.
@@ -7274,9 +7498,7 @@ class ExperimentsAPI:
7274
7498
  return GetLoggedModelResponse.from_dict(res)
7275
7499
 
7276
7500
  def get_permission_levels(self, experiment_id: str) -> GetExperimentPermissionLevelsResponse:
7277
- """Get experiment permission levels.
7278
-
7279
- Gets the permission levels that a user can have on an object.
7501
+ """Gets the permission levels that a user can have on an object.
7280
7502
 
7281
7503
  :param experiment_id: str
7282
7504
  The experiment for which to get or manage permissions.
@@ -7292,9 +7514,7 @@ class ExperimentsAPI:
7292
7514
  return GetExperimentPermissionLevelsResponse.from_dict(res)
7293
7515
 
7294
7516
  def get_permissions(self, experiment_id: str) -> ExperimentPermissions:
7295
- """Get experiment permissions.
7296
-
7297
- Gets the permissions of an experiment. Experiments can inherit permissions from their root object.
7517
+ """Gets the permissions of an experiment. Experiments can inherit permissions from their root object.
7298
7518
 
7299
7519
  :param experiment_id: str
7300
7520
  The experiment for which to get or manage permissions.
@@ -7310,9 +7530,7 @@ class ExperimentsAPI:
7310
7530
  return ExperimentPermissions.from_dict(res)
7311
7531
 
7312
7532
  def get_run(self, run_id: str, *, run_uuid: Optional[str] = None) -> GetRunResponse:
7313
- """Get a run.
7314
-
7315
- Gets the metadata, metrics, params, and tags for a run. In the case where multiple metrics with the
7533
+ """Gets the metadata, metrics, params, and tags for a run. In the case where multiple metrics with the
7316
7534
  same key are logged for a run, return only the value with the latest timestamp.
7317
7535
 
7318
7536
  If there are multiple values with the latest timestamp, return the maximum of these values.
@@ -7346,9 +7564,7 @@ class ExperimentsAPI:
7346
7564
  run_id: Optional[str] = None,
7347
7565
  run_uuid: Optional[str] = None,
7348
7566
  ) -> Iterator[FileInfo]:
7349
- """List artifacts.
7350
-
7351
- List artifacts for a run. Takes an optional `artifact_path` prefix which if specified, the response
7567
+ """List artifacts for a run. Takes an optional `artifact_path` prefix which if specified, the response
7352
7568
  contains only artifacts with the specified prefix. A maximum of 1000 artifacts will be retrieved for
7353
7569
  UC Volumes. Please call `/api/2.0/fs/directories{directory_path}` for listing artifacts in UC Volumes,
7354
7570
  which supports pagination. See [List directory contents | Files
@@ -7400,9 +7616,7 @@ class ExperimentsAPI:
7400
7616
  page_token: Optional[str] = None,
7401
7617
  view_type: Optional[ViewType] = None,
7402
7618
  ) -> Iterator[Experiment]:
7403
- """List experiments.
7404
-
7405
- Gets a list of all experiments.
7619
+ """Gets a list of all experiments.
7406
7620
 
7407
7621
  :param max_results: int (optional)
7408
7622
  Maximum number of experiments desired. If `max_results` is unspecified, return all experiments. If
@@ -7444,9 +7658,7 @@ class ExperimentsAPI:
7444
7658
  run_id: Optional[str] = None,
7445
7659
  tags: Optional[List[RunTag]] = None,
7446
7660
  ):
7447
- """Log a batch of metrics/params/tags for a run.
7448
-
7449
- Logs a batch of metrics, params, and tags for a run. If any data failed to be persisted, the server
7661
+ """Logs a batch of metrics, params, and tags for a run. If any data failed to be persisted, the server
7450
7662
  will respond with an error (non-200 status code).
7451
7663
 
7452
7664
  In case of error (due to internal server error or an invalid request), partial data may be written.
@@ -7520,11 +7732,7 @@ class ExperimentsAPI:
7520
7732
  def log_inputs(
7521
7733
  self, run_id: str, *, datasets: Optional[List[DatasetInput]] = None, models: Optional[List[ModelInput]] = None
7522
7734
  ):
7523
- """Log inputs to a run.
7524
-
7525
- **NOTE:** Experimental: This API may change or be removed in a future release without warning.
7526
-
7527
- Logs inputs, such as datasets and models, to an MLflow Run.
7735
+ """Logs inputs, such as datasets and models, to an MLflow Run.
7528
7736
 
7529
7737
  :param run_id: str
7530
7738
  ID of the run to log under
@@ -7550,9 +7758,7 @@ class ExperimentsAPI:
7550
7758
  self._api.do("POST", "/api/2.0/mlflow/runs/log-inputs", body=body, headers=headers)
7551
7759
 
7552
7760
  def log_logged_model_params(self, model_id: str, *, params: Optional[List[LoggedModelParameter]] = None):
7553
- """Log params for a logged model.
7554
-
7555
- Logs params for a logged model. A param is a key-value pair (string key, string value). Examples
7761
+ """Logs params for a logged model. A param is a key-value pair (string key, string value). Examples
7556
7762
  include hyperparameters used for ML model training. A param can be logged only once for a logged
7557
7763
  model, and attempting to overwrite an existing param with a different value will result in an error
7558
7764
 
@@ -7586,9 +7792,7 @@ class ExperimentsAPI:
7586
7792
  run_uuid: Optional[str] = None,
7587
7793
  step: Optional[int] = None,
7588
7794
  ):
7589
- """Log a metric for a run.
7590
-
7591
- Log a metric for a run. A metric is a key-value pair (string key, float value) with an associated
7795
+ """Log a metric for a run. A metric is a key-value pair (string key, float value) with an associated
7592
7796
  timestamp. Examples include the various metrics that represent ML model accuracy. A metric can be
7593
7797
  logged multiple times.
7594
7798
 
@@ -7643,9 +7847,10 @@ class ExperimentsAPI:
7643
7847
  self._api.do("POST", "/api/2.0/mlflow/runs/log-metric", body=body, headers=headers)
7644
7848
 
7645
7849
  def log_model(self, *, model_json: Optional[str] = None, run_id: Optional[str] = None):
7646
- """Log a model.
7850
+ """**Note:** the [Create a logged model](/api/workspace/experiments/createloggedmodel) API replaces this
7851
+ endpoint.
7647
7852
 
7648
- **NOTE:** Experimental: This API may change or be removed in a future release without warning.
7853
+ Log a model to an MLflow Run.
7649
7854
 
7650
7855
  :param model_json: str (optional)
7651
7856
  MLmodel file in json format.
@@ -7667,11 +7872,7 @@ class ExperimentsAPI:
7667
7872
  self._api.do("POST", "/api/2.0/mlflow/runs/log-model", body=body, headers=headers)
7668
7873
 
7669
7874
  def log_outputs(self, run_id: str, *, models: Optional[List[ModelOutput]] = None):
7670
- """Log outputs from a run.
7671
-
7672
- **NOTE**: Experimental: This API may change or be removed in a future release without warning.
7673
-
7674
- Logs outputs, such as models, from an MLflow Run.
7875
+ """Logs outputs, such as models, from an MLflow Run.
7675
7876
 
7676
7877
  :param run_id: str
7677
7878
  The ID of the Run from which to log outputs.
@@ -7693,9 +7894,7 @@ class ExperimentsAPI:
7693
7894
  self._api.do("POST", "/api/2.0/mlflow/runs/outputs", body=body, headers=headers)
7694
7895
 
7695
7896
  def log_param(self, key: str, value: str, *, run_id: Optional[str] = None, run_uuid: Optional[str] = None):
7696
- """Log a param for a run.
7697
-
7698
- Logs a param used for a run. A param is a key-value pair (string key, string value). Examples include
7897
+ """Logs a param used for a run. A param is a key-value pair (string key, string value). Examples include
7699
7898
  hyperparameters used for ML model training and constant dates and values used in an ETL pipeline. A
7700
7899
  param can be logged only once for a run.
7701
7900
 
@@ -7728,9 +7927,7 @@ class ExperimentsAPI:
7728
7927
  self._api.do("POST", "/api/2.0/mlflow/runs/log-parameter", body=body, headers=headers)
7729
7928
 
7730
7929
  def restore_experiment(self, experiment_id: str):
7731
- """Restore an experiment.
7732
-
7733
- Restore an experiment marked for deletion. This also restores associated metadata, runs, metrics,
7930
+ """Restore an experiment marked for deletion. This also restores associated metadata, runs, metrics,
7734
7931
  params, and tags. If experiment uses FileStore, underlying artifacts associated with experiment are
7735
7932
  also restored.
7736
7933
 
@@ -7752,9 +7949,7 @@ class ExperimentsAPI:
7752
7949
  self._api.do("POST", "/api/2.0/mlflow/experiments/restore", body=body, headers=headers)
7753
7950
 
7754
7951
  def restore_run(self, run_id: str):
7755
- """Restore a run.
7756
-
7757
- Restores a deleted run. This also restores associated metadata, runs, metrics, params, and tags.
7952
+ """Restores a deleted run. This also restores associated metadata, runs, metrics, params, and tags.
7758
7953
 
7759
7954
  Throws `RESOURCE_DOES_NOT_EXIST` if the run was never created or was permanently deleted.
7760
7955
 
@@ -7776,9 +7971,7 @@ class ExperimentsAPI:
7776
7971
  def restore_runs(
7777
7972
  self, experiment_id: str, min_timestamp_millis: int, *, max_runs: Optional[int] = None
7778
7973
  ) -> RestoreRunsResponse:
7779
- """Restore runs by deletion time.
7780
-
7781
- Bulk restore runs in an experiment that were deleted no earlier than the specified timestamp. Restores
7974
+ """Bulk restore runs in an experiment that were deleted no earlier than the specified timestamp. Restores
7782
7975
  at most max_runs per request. To call this API from a Databricks Notebook in Python, you can use the
7783
7976
  client code snippet on
7784
7977
 
@@ -7817,9 +8010,7 @@ class ExperimentsAPI:
7817
8010
  page_token: Optional[str] = None,
7818
8011
  view_type: Optional[ViewType] = None,
7819
8012
  ) -> Iterator[Experiment]:
7820
- """Search experiments.
7821
-
7822
- Searches for experiments that satisfy specified search criteria.
8013
+ """Searches for experiments that satisfy specified search criteria.
7823
8014
 
7824
8015
  :param filter: str (optional)
7825
8016
  String representing a SQL filter condition (e.g. "name ILIKE 'my-experiment%'")
@@ -7871,9 +8062,7 @@ class ExperimentsAPI:
7871
8062
  order_by: Optional[List[SearchLoggedModelsOrderBy]] = None,
7872
8063
  page_token: Optional[str] = None,
7873
8064
  ) -> SearchLoggedModelsResponse:
7874
- """Search logged models.
7875
-
7876
- Search for Logged Models that satisfy specified search criteria.
8065
+ """Search for Logged Models that satisfy specified search criteria.
7877
8066
 
7878
8067
  :param datasets: List[:class:`SearchLoggedModelsDataset`] (optional)
7879
8068
  List of datasets on which to apply the metrics filter clauses. For example, a filter with
@@ -7928,9 +8117,7 @@ class ExperimentsAPI:
7928
8117
  page_token: Optional[str] = None,
7929
8118
  run_view_type: Optional[ViewType] = None,
7930
8119
  ) -> Iterator[Run]:
7931
- """Search for runs.
7932
-
7933
- Searches for runs that satisfy expressions.
8120
+ """Searches for runs that satisfy expressions.
7934
8121
 
7935
8122
  Search expressions can use `mlflowMetric` and `mlflowParam` keys.
7936
8123
 
@@ -7990,9 +8177,7 @@ class ExperimentsAPI:
7990
8177
  body["page_token"] = json["next_page_token"]
7991
8178
 
7992
8179
  def set_experiment_tag(self, experiment_id: str, key: str, value: str):
7993
- """Set a tag for an experiment.
7994
-
7995
- Sets a tag on an experiment. Experiment tags are metadata that can be updated.
8180
+ """Sets a tag on an experiment. Experiment tags are metadata that can be updated.
7996
8181
 
7997
8182
  :param experiment_id: str
7998
8183
  ID of the experiment under which to log the tag. Must be provided.
@@ -8018,7 +8203,7 @@ class ExperimentsAPI:
8018
8203
  self._api.do("POST", "/api/2.0/mlflow/experiments/set-experiment-tag", body=body, headers=headers)
8019
8204
 
8020
8205
  def set_logged_model_tags(self, model_id: str, *, tags: Optional[List[LoggedModelTag]] = None):
8021
- """Set a tag for a logged model.
8206
+ """Set tags for a logged model.
8022
8207
 
8023
8208
  :param model_id: str
8024
8209
  The ID of the logged model to set the tags on.
@@ -8040,9 +8225,7 @@ class ExperimentsAPI:
8040
8225
  def set_permissions(
8041
8226
  self, experiment_id: str, *, access_control_list: Optional[List[ExperimentAccessControlRequest]] = None
8042
8227
  ) -> ExperimentPermissions:
8043
- """Set experiment permissions.
8044
-
8045
- Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
8228
+ """Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
8046
8229
  permissions if none are specified. Objects can inherit permissions from their root object.
8047
8230
 
8048
8231
  :param experiment_id: str
@@ -8063,9 +8246,7 @@ class ExperimentsAPI:
8063
8246
  return ExperimentPermissions.from_dict(res)
8064
8247
 
8065
8248
  def set_tag(self, key: str, value: str, *, run_id: Optional[str] = None, run_uuid: Optional[str] = None):
8066
- """Set a tag for a run.
8067
-
8068
- Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.
8249
+ """Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.
8069
8250
 
8070
8251
  :param key: str
8071
8252
  Name of the tag. Keys up to 250 bytes in size are supported.
@@ -8096,9 +8277,7 @@ class ExperimentsAPI:
8096
8277
  self._api.do("POST", "/api/2.0/mlflow/runs/set-tag", body=body, headers=headers)
8097
8278
 
8098
8279
  def update_experiment(self, experiment_id: str, *, new_name: Optional[str] = None):
8099
- """Update an experiment.
8100
-
8101
- Updates experiment metadata.
8280
+ """Updates experiment metadata.
8102
8281
 
8103
8282
  :param experiment_id: str
8104
8283
  ID of the associated experiment.
@@ -8122,9 +8301,7 @@ class ExperimentsAPI:
8122
8301
  def update_permissions(
8123
8302
  self, experiment_id: str, *, access_control_list: Optional[List[ExperimentAccessControlRequest]] = None
8124
8303
  ) -> ExperimentPermissions:
8125
- """Update experiment permissions.
8126
-
8127
- Updates the permissions on an experiment. Experiments can inherit permissions from their root object.
8304
+ """Updates the permissions on an experiment. Experiments can inherit permissions from their root object.
8128
8305
 
8129
8306
  :param experiment_id: str
8130
8307
  The experiment for which to get or manage permissions.
@@ -8152,9 +8329,7 @@ class ExperimentsAPI:
8152
8329
  run_uuid: Optional[str] = None,
8153
8330
  status: Optional[UpdateRunStatus] = None,
8154
8331
  ) -> UpdateRunResponse:
8155
- """Update a run.
8156
-
8157
- Updates run metadata.
8332
+ """Updates run metadata.
8158
8333
 
8159
8334
  :param end_time: int (optional)
8160
8335
  Unix timestamp in milliseconds of when the run ended.
@@ -8190,6 +8365,146 @@ class ExperimentsAPI:
8190
8365
  return UpdateRunResponse.from_dict(res)
8191
8366
 
8192
8367
 
8368
+ class FeatureStoreAPI:
8369
+ """A feature store is a centralized repository that enables data scientists to find and share features. Using
8370
+ a feature store also ensures that the code used to compute feature values is the same during model
8371
+ training and when the model is used for inference.
8372
+
8373
+ An online store is a low-latency database used for feature lookup during real-time model inference or
8374
+ serve feature for real-time applications."""
8375
+
8376
+ def __init__(self, api_client):
8377
+ self._api = api_client
8378
+
8379
+ def create_online_store(self, online_store: OnlineStore) -> OnlineStore:
8380
+ """Create an Online Feature Store.
8381
+
8382
+ :param online_store: :class:`OnlineStore`
8383
+ An OnlineStore is a logical database instance that stores and serves features online.
8384
+
8385
+ :returns: :class:`OnlineStore`
8386
+ """
8387
+ body = online_store.as_dict()
8388
+ headers = {
8389
+ "Accept": "application/json",
8390
+ "Content-Type": "application/json",
8391
+ }
8392
+
8393
+ res = self._api.do("POST", "/api/2.0/feature-store/online-stores", body=body, headers=headers)
8394
+ return OnlineStore.from_dict(res)
8395
+
8396
+ def delete_online_store(self, name: str):
8397
+ """Delete an Online Feature Store.
8398
+
8399
+ :param name: str
8400
+ Name of the online store to delete.
8401
+
8402
+
8403
+ """
8404
+
8405
+ headers = {
8406
+ "Accept": "application/json",
8407
+ }
8408
+
8409
+ self._api.do("DELETE", f"/api/2.0/feature-store/online-stores/{name}", headers=headers)
8410
+
8411
+ def get_online_store(self, name: str) -> OnlineStore:
8412
+ """Get an Online Feature Store.
8413
+
8414
+ :param name: str
8415
+ Name of the online store to get.
8416
+
8417
+ :returns: :class:`OnlineStore`
8418
+ """
8419
+
8420
+ headers = {
8421
+ "Accept": "application/json",
8422
+ }
8423
+
8424
+ res = self._api.do("GET", f"/api/2.0/feature-store/online-stores/{name}", headers=headers)
8425
+ return OnlineStore.from_dict(res)
8426
+
8427
+ def list_online_stores(
8428
+ self, *, page_size: Optional[int] = None, page_token: Optional[str] = None
8429
+ ) -> Iterator[OnlineStore]:
8430
+ """List Online Feature Stores.
8431
+
8432
+ :param page_size: int (optional)
8433
+ The maximum number of results to return. Defaults to 100 if not specified.
8434
+ :param page_token: str (optional)
8435
+ Pagination token to go to the next page based on a previous query.
8436
+
8437
+ :returns: Iterator over :class:`OnlineStore`
8438
+ """
8439
+
8440
+ query = {}
8441
+ if page_size is not None:
8442
+ query["page_size"] = page_size
8443
+ if page_token is not None:
8444
+ query["page_token"] = page_token
8445
+ headers = {
8446
+ "Accept": "application/json",
8447
+ }
8448
+
8449
+ while True:
8450
+ json = self._api.do("GET", "/api/2.0/feature-store/online-stores", query=query, headers=headers)
8451
+ if "online_stores" in json:
8452
+ for v in json["online_stores"]:
8453
+ yield OnlineStore.from_dict(v)
8454
+ if "next_page_token" not in json or not json["next_page_token"]:
8455
+ return
8456
+ query["page_token"] = json["next_page_token"]
8457
+
8458
+ def publish_table(self, source_table_name: str, publish_spec: PublishSpec) -> PublishTableResponse:
8459
+ """Publish features.
8460
+
8461
+ :param source_table_name: str
8462
+ The full three-part (catalog, schema, table) name of the source table.
8463
+ :param publish_spec: :class:`PublishSpec`
8464
+ The specification for publishing the online table from the source table.
8465
+
8466
+ :returns: :class:`PublishTableResponse`
8467
+ """
8468
+ body = {}
8469
+ if publish_spec is not None:
8470
+ body["publish_spec"] = publish_spec.as_dict()
8471
+ headers = {
8472
+ "Accept": "application/json",
8473
+ "Content-Type": "application/json",
8474
+ }
8475
+
8476
+ res = self._api.do(
8477
+ "POST", f"/api/2.0/feature-store/tables/{source_table_name}/publish", body=body, headers=headers
8478
+ )
8479
+ return PublishTableResponse.from_dict(res)
8480
+
8481
+ def update_online_store(self, name: str, online_store: OnlineStore, update_mask: str) -> OnlineStore:
8482
+ """Update an Online Feature Store.
8483
+
8484
+ :param name: str
8485
+ The name of the online store. This is the unique identifier for the online store.
8486
+ :param online_store: :class:`OnlineStore`
8487
+ An OnlineStore is a logical database instance that stores and serves features online.
8488
+ :param update_mask: str
8489
+ The list of fields to update.
8490
+
8491
+ :returns: :class:`OnlineStore`
8492
+ """
8493
+ body = online_store.as_dict()
8494
+ query = {}
8495
+ if update_mask is not None:
8496
+ query["update_mask"] = update_mask
8497
+ headers = {
8498
+ "Accept": "application/json",
8499
+ "Content-Type": "application/json",
8500
+ }
8501
+
8502
+ res = self._api.do(
8503
+ "PATCH", f"/api/2.0/feature-store/online-stores/{name}", query=query, body=body, headers=headers
8504
+ )
8505
+ return OnlineStore.from_dict(res)
8506
+
8507
+
8193
8508
  class ForecastingAPI:
8194
8509
  """The Forecasting API allows you to create and get serverless forecasting experiments"""
8195
8510
 
@@ -8252,9 +8567,7 @@ class ForecastingAPI:
8252
8567
  timeseries_identifier_columns: Optional[List[str]] = None,
8253
8568
  training_frameworks: Optional[List[str]] = None,
8254
8569
  ) -> Wait[ForecastingExperiment]:
8255
- """Create a forecasting experiment.
8256
-
8257
- Creates a serverless forecasting experiment. Returns the experiment ID.
8570
+ """Creates a serverless forecasting experiment. Returns the experiment ID.
8258
8571
 
8259
8572
  :param train_data_path: str
8260
8573
  The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name,
@@ -8399,9 +8712,7 @@ class ForecastingAPI:
8399
8712
  ).result(timeout=timeout)
8400
8713
 
8401
8714
  def get_experiment(self, experiment_id: str) -> ForecastingExperiment:
8402
- """Get a forecasting experiment.
8403
-
8404
- Public RPC to get forecasting experiment
8715
+ """Public RPC to get forecasting experiment
8405
8716
 
8406
8717
  :param experiment_id: str
8407
8718
  The unique ID of a forecasting experiment
@@ -8432,9 +8743,7 @@ class ModelRegistryAPI:
8432
8743
  def approve_transition_request(
8433
8744
  self, name: str, version: str, stage: Stage, archive_existing_versions: bool, *, comment: Optional[str] = None
8434
8745
  ) -> ApproveTransitionRequestResponse:
8435
- """Approve transition request.
8436
-
8437
- Approves a model version stage transition request.
8746
+ """Approves a model version stage transition request.
8438
8747
 
8439
8748
  :param name: str
8440
8749
  Name of the model.
@@ -8477,9 +8786,7 @@ class ModelRegistryAPI:
8477
8786
  return ApproveTransitionRequestResponse.from_dict(res)
8478
8787
 
8479
8788
  def create_comment(self, name: str, version: str, comment: str) -> CreateCommentResponse:
8480
- """Post a comment.
8481
-
8482
- Posts a comment on a model version. A comment can be submitted either by a user or programmatically to
8789
+ """Posts a comment on a model version. A comment can be submitted either by a user or programmatically to
8483
8790
  display relevant information about the model. For example, test results or deployment errors.
8484
8791
 
8485
8792
  :param name: str
@@ -8509,9 +8816,7 @@ class ModelRegistryAPI:
8509
8816
  def create_model(
8510
8817
  self, name: str, *, description: Optional[str] = None, tags: Optional[List[ModelTag]] = None
8511
8818
  ) -> CreateModelResponse:
8512
- """Create a model.
8513
-
8514
- Creates a new registered model with the name specified in the request body.
8819
+ """Creates a new registered model with the name specified in the request body.
8515
8820
 
8516
8821
  Throws `RESOURCE_ALREADY_EXISTS` if a registered model with the given name exists.
8517
8822
 
@@ -8549,9 +8854,7 @@ class ModelRegistryAPI:
8549
8854
  run_link: Optional[str] = None,
8550
8855
  tags: Optional[List[ModelVersionTag]] = None,
8551
8856
  ) -> CreateModelVersionResponse:
8552
- """Create a model version.
8553
-
8554
- Creates a model version.
8857
+ """Creates a model version.
8555
8858
 
8556
8859
  :param name: str
8557
8860
  Register model under this name
@@ -8594,9 +8897,7 @@ class ModelRegistryAPI:
8594
8897
  def create_transition_request(
8595
8898
  self, name: str, version: str, stage: Stage, *, comment: Optional[str] = None
8596
8899
  ) -> CreateTransitionRequestResponse:
8597
- """Make a transition request.
8598
-
8599
- Creates a model version stage transition request.
8900
+ """Creates a model version stage transition request.
8600
8901
 
8601
8902
  :param name: str
8602
8903
  Name of the model.
@@ -8644,9 +8945,7 @@ class ModelRegistryAPI:
8644
8945
  model_name: Optional[str] = None,
8645
8946
  status: Optional[RegistryWebhookStatus] = None,
8646
8947
  ) -> CreateWebhookResponse:
8647
- """Create a webhook.
8648
-
8649
- **NOTE**: This endpoint is in Public Preview.
8948
+ """**NOTE**: This endpoint is in Public Preview.
8650
8949
 
8651
8950
  Creates a registry webhook.
8652
8951
 
@@ -8719,9 +9018,7 @@ class ModelRegistryAPI:
8719
9018
  return CreateWebhookResponse.from_dict(res)
8720
9019
 
8721
9020
  def delete_comment(self, id: str):
8722
- """Delete a comment.
8723
-
8724
- Deletes a comment on a model version.
9021
+ """Deletes a comment on a model version.
8725
9022
 
8726
9023
  :param id: str
8727
9024
  Unique identifier of an activity
@@ -8739,9 +9036,7 @@ class ModelRegistryAPI:
8739
9036
  self._api.do("DELETE", "/api/2.0/mlflow/comments/delete", query=query, headers=headers)
8740
9037
 
8741
9038
  def delete_model(self, name: str):
8742
- """Delete a model.
8743
-
8744
- Deletes a registered model.
9039
+ """Deletes a registered model.
8745
9040
 
8746
9041
  :param name: str
8747
9042
  Registered model unique name identifier.
@@ -8759,9 +9054,7 @@ class ModelRegistryAPI:
8759
9054
  self._api.do("DELETE", "/api/2.0/mlflow/registered-models/delete", query=query, headers=headers)
8760
9055
 
8761
9056
  def delete_model_tag(self, name: str, key: str):
8762
- """Delete a model tag.
8763
-
8764
- Deletes the tag for a registered model.
9057
+ """Deletes the tag for a registered model.
8765
9058
 
8766
9059
  :param name: str
8767
9060
  Name of the registered model that the tag was logged under.
@@ -8784,9 +9077,7 @@ class ModelRegistryAPI:
8784
9077
  self._api.do("DELETE", "/api/2.0/mlflow/registered-models/delete-tag", query=query, headers=headers)
8785
9078
 
8786
9079
  def delete_model_version(self, name: str, version: str):
8787
- """Delete a model version.
8788
-
8789
- Deletes a model version.
9080
+ """Deletes a model version.
8790
9081
 
8791
9082
  :param name: str
8792
9083
  Name of the registered model
@@ -8808,9 +9099,7 @@ class ModelRegistryAPI:
8808
9099
  self._api.do("DELETE", "/api/2.0/mlflow/model-versions/delete", query=query, headers=headers)
8809
9100
 
8810
9101
  def delete_model_version_tag(self, name: str, version: str, key: str):
8811
- """Delete a model version tag.
8812
-
8813
- Deletes a model version tag.
9102
+ """Deletes a model version tag.
8814
9103
 
8815
9104
  :param name: str
8816
9105
  Name of the registered model that the tag was logged under.
@@ -8845,9 +9134,7 @@ class ModelRegistryAPI:
8845
9134
  *,
8846
9135
  comment: Optional[str] = None,
8847
9136
  ):
8848
- """Delete a transition request.
8849
-
8850
- Cancels a model version stage transition request.
9137
+ """Cancels a model version stage transition request.
8851
9138
 
8852
9139
  :param name: str
8853
9140
  Name of the model.
@@ -8890,9 +9177,7 @@ class ModelRegistryAPI:
8890
9177
  self._api.do("DELETE", "/api/2.0/mlflow/transition-requests/delete", query=query, headers=headers)
8891
9178
 
8892
9179
  def delete_webhook(self, *, id: Optional[str] = None):
8893
- """Delete a webhook.
8894
-
8895
- **NOTE:** This endpoint is in Public Preview.
9180
+ """**NOTE:** This endpoint is in Public Preview.
8896
9181
 
8897
9182
  Deletes a registry webhook.
8898
9183
 
@@ -8912,9 +9197,7 @@ class ModelRegistryAPI:
8912
9197
  self._api.do("DELETE", "/api/2.0/mlflow/registry-webhooks/delete", query=query, headers=headers)
8913
9198
 
8914
9199
  def get_latest_versions(self, name: str, *, stages: Optional[List[str]] = None) -> Iterator[ModelVersion]:
8915
- """Get the latest version.
8916
-
8917
- Gets the latest version of a registered model.
9200
+ """Gets the latest version of a registered model.
8918
9201
 
8919
9202
  :param name: str
8920
9203
  Registered model unique name identifier.
@@ -8938,9 +9221,7 @@ class ModelRegistryAPI:
8938
9221
  return parsed if parsed is not None else []
8939
9222
 
8940
9223
  def get_model(self, name: str) -> GetModelResponse:
8941
- """Get model.
8942
-
8943
- Get the details of a model. This is a Databricks workspace version of the [MLflow endpoint] that also
9224
+ """Get the details of a model. This is a Databricks workspace version of the [MLflow endpoint] that also
8944
9225
  returns the model's Databricks workspace ID and the permission level of the requesting user on the
8945
9226
  model.
8946
9227
 
@@ -8965,8 +9246,6 @@ class ModelRegistryAPI:
8965
9246
  def get_model_version(self, name: str, version: str) -> GetModelVersionResponse:
8966
9247
  """Get a model version.
8967
9248
 
8968
- Get a model version.
8969
-
8970
9249
  :param name: str
8971
9250
  Name of the registered model
8972
9251
  :param version: str
@@ -8988,9 +9267,7 @@ class ModelRegistryAPI:
8988
9267
  return GetModelVersionResponse.from_dict(res)
8989
9268
 
8990
9269
  def get_model_version_download_uri(self, name: str, version: str) -> GetModelVersionDownloadUriResponse:
8991
- """Get a model version URI.
8992
-
8993
- Gets a URI to download the model version.
9270
+ """Gets a URI to download the model version.
8994
9271
 
8995
9272
  :param name: str
8996
9273
  Name of the registered model
@@ -9013,9 +9290,7 @@ class ModelRegistryAPI:
9013
9290
  return GetModelVersionDownloadUriResponse.from_dict(res)
9014
9291
 
9015
9292
  def get_permission_levels(self, registered_model_id: str) -> GetRegisteredModelPermissionLevelsResponse:
9016
- """Get registered model permission levels.
9017
-
9018
- Gets the permission levels that a user can have on an object.
9293
+ """Gets the permission levels that a user can have on an object.
9019
9294
 
9020
9295
  :param registered_model_id: str
9021
9296
  The registered model for which to get or manage permissions.
@@ -9033,9 +9308,7 @@ class ModelRegistryAPI:
9033
9308
  return GetRegisteredModelPermissionLevelsResponse.from_dict(res)
9034
9309
 
9035
9310
  def get_permissions(self, registered_model_id: str) -> RegisteredModelPermissions:
9036
- """Get registered model permissions.
9037
-
9038
- Gets the permissions of a registered model. Registered models can inherit permissions from their root
9311
+ """Gets the permissions of a registered model. Registered models can inherit permissions from their root
9039
9312
  object.
9040
9313
 
9041
9314
  :param registered_model_id: str
@@ -9052,9 +9325,7 @@ class ModelRegistryAPI:
9052
9325
  return RegisteredModelPermissions.from_dict(res)
9053
9326
 
9054
9327
  def list_models(self, *, max_results: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[Model]:
9055
- """List models.
9056
-
9057
- Lists all available registered models, up to the limit specified in __max_results__.
9328
+ """Lists all available registered models, up to the limit specified in __max_results__.
9058
9329
 
9059
9330
  :param max_results: int (optional)
9060
9331
  Maximum number of registered models desired. Max threshold is 1000.
@@ -9083,9 +9354,7 @@ class ModelRegistryAPI:
9083
9354
  query["page_token"] = json["next_page_token"]
9084
9355
 
9085
9356
  def list_transition_requests(self, name: str, version: str) -> Iterator[Activity]:
9086
- """List transition requests.
9087
-
9088
- Gets a list of all open stage transition requests for the model version.
9357
+ """Gets a list of all open stage transition requests for the model version.
9089
9358
 
9090
9359
  :param name: str
9091
9360
  Name of the model.
@@ -9115,9 +9384,7 @@ class ModelRegistryAPI:
9115
9384
  model_name: Optional[str] = None,
9116
9385
  page_token: Optional[str] = None,
9117
9386
  ) -> Iterator[RegistryWebhook]:
9118
- """List registry webhooks.
9119
-
9120
- **NOTE:** This endpoint is in Public Preview.
9387
+ """**NOTE:** This endpoint is in Public Preview.
9121
9388
 
9122
9389
  Lists all registry webhooks.
9123
9390
 
@@ -9156,9 +9423,7 @@ class ModelRegistryAPI:
9156
9423
  def reject_transition_request(
9157
9424
  self, name: str, version: str, stage: Stage, *, comment: Optional[str] = None
9158
9425
  ) -> RejectTransitionRequestResponse:
9159
- """Reject a transition request.
9160
-
9161
- Rejects a model version stage transition request.
9426
+ """Rejects a model version stage transition request.
9162
9427
 
9163
9428
  :param name: str
9164
9429
  Name of the model.
@@ -9197,9 +9462,7 @@ class ModelRegistryAPI:
9197
9462
  return RejectTransitionRequestResponse.from_dict(res)
9198
9463
 
9199
9464
  def rename_model(self, name: str, *, new_name: Optional[str] = None) -> RenameModelResponse:
9200
- """Rename a model.
9201
-
9202
- Renames a registered model.
9465
+ """Renames a registered model.
9203
9466
 
9204
9467
  :param name: str
9205
9468
  Registered model unique name identifier.
@@ -9229,9 +9492,7 @@ class ModelRegistryAPI:
9229
9492
  order_by: Optional[List[str]] = None,
9230
9493
  page_token: Optional[str] = None,
9231
9494
  ) -> Iterator[ModelVersion]:
9232
- """Searches model versions.
9233
-
9234
- Searches for specific model versions based on the supplied __filter__.
9495
+ """Searches for specific model versions based on the supplied __filter__.
9235
9496
 
9236
9497
  :param filter: str (optional)
9237
9498
  String filter condition, like "name='my-model-name'". Must be a single boolean condition, with
@@ -9278,9 +9539,7 @@ class ModelRegistryAPI:
9278
9539
  order_by: Optional[List[str]] = None,
9279
9540
  page_token: Optional[str] = None,
9280
9541
  ) -> Iterator[Model]:
9281
- """Search models.
9282
-
9283
- Search for registered models based on the specified __filter__.
9542
+ """Search for registered models based on the specified __filter__.
9284
9543
 
9285
9544
  :param filter: str (optional)
9286
9545
  String filter condition, like "name LIKE 'my-model-name'". Interpreted in the backend automatically
@@ -9321,9 +9580,7 @@ class ModelRegistryAPI:
9321
9580
  query["page_token"] = json["next_page_token"]
9322
9581
 
9323
9582
  def set_model_tag(self, name: str, key: str, value: str):
9324
- """Set a tag.
9325
-
9326
- Sets a tag on a registered model.
9583
+ """Sets a tag on a registered model.
9327
9584
 
9328
9585
  :param name: str
9329
9586
  Unique name of the model.
@@ -9352,9 +9609,7 @@ class ModelRegistryAPI:
9352
9609
  self._api.do("POST", "/api/2.0/mlflow/registered-models/set-tag", body=body, headers=headers)
9353
9610
 
9354
9611
  def set_model_version_tag(self, name: str, version: str, key: str, value: str):
9355
- """Set a version tag.
9356
-
9357
- Sets a model version tag.
9612
+ """Sets a model version tag.
9358
9613
 
9359
9614
  :param name: str
9360
9615
  Unique name of the model.
@@ -9392,9 +9647,7 @@ class ModelRegistryAPI:
9392
9647
  *,
9393
9648
  access_control_list: Optional[List[RegisteredModelAccessControlRequest]] = None,
9394
9649
  ) -> RegisteredModelPermissions:
9395
- """Set registered model permissions.
9396
-
9397
- Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
9650
+ """Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
9398
9651
  permissions if none are specified. Objects can inherit permissions from their root object.
9399
9652
 
9400
9653
  :param registered_model_id: str
@@ -9419,9 +9672,7 @@ class ModelRegistryAPI:
9419
9672
  def test_registry_webhook(
9420
9673
  self, id: str, *, event: Optional[RegistryWebhookEvent] = None
9421
9674
  ) -> TestRegistryWebhookResponse:
9422
- """Test a webhook.
9423
-
9424
- **NOTE:** This endpoint is in Public Preview.
9675
+ """**NOTE:** This endpoint is in Public Preview.
9425
9676
 
9426
9677
  Tests a registry webhook.
9427
9678
 
@@ -9449,9 +9700,7 @@ class ModelRegistryAPI:
9449
9700
  def transition_stage(
9450
9701
  self, name: str, version: str, stage: Stage, archive_existing_versions: bool, *, comment: Optional[str] = None
9451
9702
  ) -> TransitionStageResponse:
9452
- """Transition a stage.
9453
-
9454
- Transition a model version's stage. This is a Databricks workspace version of the [MLflow endpoint]
9703
+ """Transition a model version's stage. This is a Databricks workspace version of the [MLflow endpoint]
9455
9704
  that also accepts a comment associated with the transition to be recorded.",
9456
9705
 
9457
9706
  [MLflow endpoint]: https://www.mlflow.org/docs/latest/rest-api.html#transition-modelversion-stage
@@ -9499,9 +9748,7 @@ class ModelRegistryAPI:
9499
9748
  return TransitionStageResponse.from_dict(res)
9500
9749
 
9501
9750
  def update_comment(self, id: str, comment: str) -> UpdateCommentResponse:
9502
- """Update a comment.
9503
-
9504
- Post an edit to a comment on a model version.
9751
+ """Post an edit to a comment on a model version.
9505
9752
 
9506
9753
  :param id: str
9507
9754
  Unique identifier of an activity
@@ -9524,9 +9771,7 @@ class ModelRegistryAPI:
9524
9771
  return UpdateCommentResponse.from_dict(res)
9525
9772
 
9526
9773
  def update_model(self, name: str, *, description: Optional[str] = None):
9527
- """Update model.
9528
-
9529
- Updates a registered model.
9774
+ """Updates a registered model.
9530
9775
 
9531
9776
  :param name: str
9532
9777
  Registered model unique name identifier.
@@ -9548,9 +9793,7 @@ class ModelRegistryAPI:
9548
9793
  self._api.do("PATCH", "/api/2.0/mlflow/registered-models/update", body=body, headers=headers)
9549
9794
 
9550
9795
  def update_model_version(self, name: str, version: str, *, description: Optional[str] = None):
9551
- """Update model version.
9552
-
9553
- Updates the model version.
9796
+ """Updates the model version.
9554
9797
 
9555
9798
  :param name: str
9556
9799
  Name of the registered model
@@ -9581,9 +9824,7 @@ class ModelRegistryAPI:
9581
9824
  *,
9582
9825
  access_control_list: Optional[List[RegisteredModelAccessControlRequest]] = None,
9583
9826
  ) -> RegisteredModelPermissions:
9584
- """Update registered model permissions.
9585
-
9586
- Updates the permissions on a registered model. Registered models can inherit permissions from their
9827
+ """Updates the permissions on a registered model. Registered models can inherit permissions from their
9587
9828
  root object.
9588
9829
 
9589
9830
  :param registered_model_id: str
@@ -9615,9 +9856,7 @@ class ModelRegistryAPI:
9615
9856
  job_spec: Optional[JobSpec] = None,
9616
9857
  status: Optional[RegistryWebhookStatus] = None,
9617
9858
  ):
9618
- """Update a webhook.
9619
-
9620
- **NOTE:** This endpoint is in Public Preview.
9859
+ """**NOTE:** This endpoint is in Public Preview.
9621
9860
 
9622
9861
  Updates a registry webhook.
9623
9862