databricks-sdk 0.56.0__tar.gz → 0.57.0__tar.gz
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-0.56.0 → databricks_sdk-0.57.0}/CHANGELOG.md +27 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/PKG-INFO +1 -1
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/__init__.py +15 -9
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/aibuilder.py +157 -16
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/apps.py +14 -42
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/billing.py +17 -51
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/catalog.py +198 -399
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/cleanrooms.py +11 -33
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/compute.py +63 -189
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/dashboards.py +21 -63
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/database.py +45 -30
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/files.py +18 -54
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/iam.py +55 -165
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/jobs.py +232 -85
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/marketplace.py +46 -146
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/ml.py +455 -216
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/oauth2.py +17 -45
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/pipelines.py +81 -40
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/provisioning.py +30 -90
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/qualitymonitorv2.py +5 -15
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/serving.py +30 -42
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/settings.py +103 -314
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/sharing.py +30 -86
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/sql.py +74 -184
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/vectorsearch.py +13 -43
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/workspace.py +35 -105
- databricks_sdk-0.57.0/databricks/sdk/version.py +1 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks_sdk.egg-info/PKG-INFO +1 -1
- databricks_sdk-0.56.0/databricks/sdk/version.py +0 -1
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/CONTRIBUTING.md +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/DCO +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/LICENSE +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/MANIFEST.in +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/Makefile +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/NOTICE +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/README.md +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/SECURITY.md +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/__init__.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/_base_client.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/_property.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/_widgets/__init__.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/_widgets/default_widgets_utils.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/_widgets/ipywidgets_utils.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/azure.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/casing.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/clock.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/config.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/core.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/credentials_provider.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/data_plane.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/dbutils.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/environments.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/__init__.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/base.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/customizer.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/deserializer.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/details.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/mapper.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/overrides.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/parser.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/platform.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/private_link.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/errors/sdk.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/logger/__init__.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/logger/round_trip_logger.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/mixins/__init__.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/mixins/compute.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/mixins/files.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/mixins/jobs.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/mixins/open_ai_client.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/mixins/workspace.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/oauth.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/oidc.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/oidc_token_supplier.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/py.typed +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/retries.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/runtime/__init__.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/runtime/dbutils_stub.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/__init__.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/service/_internal.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks/sdk/useragent.py +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks_sdk.egg-info/SOURCES.txt +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks_sdk.egg-info/dependency_links.txt +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks_sdk.egg-info/requires.txt +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/databricks_sdk.egg-info/top_level.txt +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/pyproject.toml +0 -0
- {databricks_sdk-0.56.0 → databricks_sdk-0.57.0}/setup.cfg +0 -0
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Version changelog
|
|
2
2
|
|
|
3
|
+
## Release v0.57.0
|
|
4
|
+
|
|
5
|
+
### API Changes
|
|
6
|
+
* Added [w.ai_builder](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/aibuilder/ai_builder.html) workspace-level service.
|
|
7
|
+
* Added [w.feature_store](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/ml/feature_store.html) workspace-level service.
|
|
8
|
+
* Added `expiration_time` field for `databricks.sdk.service.database.DatabaseCredential`.
|
|
9
|
+
* Added `effective_stopped` field for `databricks.sdk.service.database.DatabaseInstance`.
|
|
10
|
+
* Added `existing_pipeline_id` field for `databricks.sdk.service.database.SyncedTableSpec`.
|
|
11
|
+
* Added `pipeline_id` field for `databricks.sdk.service.database.SyncedTableStatus`.
|
|
12
|
+
* Added `dbt_platform_output` field for `databricks.sdk.service.jobs.RunOutput`.
|
|
13
|
+
* Added `dbt_platform_task` field for `databricks.sdk.service.jobs.RunTask`.
|
|
14
|
+
* Added `dbt_platform_task` field for `databricks.sdk.service.jobs.SubmitTask`.
|
|
15
|
+
* Added `dbt_platform_task` field for `databricks.sdk.service.jobs.Task`.
|
|
16
|
+
* Added `environment` field for `databricks.sdk.service.pipelines.CreatePipeline`.
|
|
17
|
+
* Added `environment` field for `databricks.sdk.service.pipelines.EditPipeline`.
|
|
18
|
+
* Added `environment` field for `databricks.sdk.service.pipelines.PipelineSpec`.
|
|
19
|
+
* Added `description` field for `databricks.sdk.service.serving.ServingEndpoint`.
|
|
20
|
+
* Added `description` field for `databricks.sdk.service.serving.ServingEndpointDetailed`.
|
|
21
|
+
* Added `cancelled`, `error`, `queued`, `running`, `starting` and `success` enum values for `databricks.sdk.service.jobs.DbtPlatformRunStatus`.
|
|
22
|
+
* [Breaking] Changed `status` field for `databricks.sdk.service.jobs.DbtCloudJobRunStep` to type `databricks.sdk.service.jobs.DbtPlatformRunStatus` dataclass.
|
|
23
|
+
* [Breaking] Removed [w.custom_llms](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/aibuilder/custom_llms.html) workspace-level service.
|
|
24
|
+
* [Breaking] Removed `table_serving_url` field for `databricks.sdk.service.database.DatabaseTable`.
|
|
25
|
+
* [Breaking] Removed `table_serving_url` field for `databricks.sdk.service.database.SyncedDatabaseTable`.
|
|
26
|
+
* [Breaking] Removed `pipeline_id` field for `databricks.sdk.service.database.SyncedTableSpec`.
|
|
27
|
+
* [Breaking] Removed `cancelled`, `error`, `queued`, `running`, `starting` and `success` enum values for `databricks.sdk.service.jobs.DbtCloudRunStatus`.
|
|
28
|
+
|
|
29
|
+
|
|
3
30
|
## Release v0.56.0
|
|
4
31
|
|
|
5
32
|
### API Changes
|
|
@@ -36,7 +36,7 @@ from databricks.sdk.service import sharing as pkg_sharing
|
|
|
36
36
|
from databricks.sdk.service import sql as pkg_sql
|
|
37
37
|
from databricks.sdk.service import vectorsearch as pkg_vectorsearch
|
|
38
38
|
from databricks.sdk.service import workspace as pkg_workspace
|
|
39
|
-
from databricks.sdk.service.aibuilder import
|
|
39
|
+
from databricks.sdk.service.aibuilder import AiBuilderAPI
|
|
40
40
|
from databricks.sdk.service.apps import AppsAPI
|
|
41
41
|
from databricks.sdk.service.billing import (BillableUsageAPI, BudgetPolicyAPI,
|
|
42
42
|
BudgetsAPI, LogDeliveryAPI,
|
|
@@ -87,8 +87,8 @@ from databricks.sdk.service.marketplace import (
|
|
|
87
87
|
ProviderExchangeFiltersAPI, ProviderExchangesAPI, ProviderFilesAPI,
|
|
88
88
|
ProviderListingsAPI, ProviderPersonalizationRequestsAPI,
|
|
89
89
|
ProviderProviderAnalyticsDashboardsAPI, ProviderProvidersAPI)
|
|
90
|
-
from databricks.sdk.service.ml import (ExperimentsAPI,
|
|
91
|
-
ModelRegistryAPI)
|
|
90
|
+
from databricks.sdk.service.ml import (ExperimentsAPI, FeatureStoreAPI,
|
|
91
|
+
ForecastingAPI, ModelRegistryAPI)
|
|
92
92
|
from databricks.sdk.service.oauth2 import (AccountFederationPolicyAPI,
|
|
93
93
|
CustomAppIntegrationAPI,
|
|
94
94
|
OAuthPublishedAppsAPI,
|
|
@@ -235,6 +235,7 @@ class WorkspaceClient:
|
|
|
235
235
|
serving_endpoints = ServingEndpointsExt(self._api_client)
|
|
236
236
|
self._access_control = pkg_iam.AccessControlAPI(self._api_client)
|
|
237
237
|
self._account_access_control_proxy = pkg_iam.AccountAccessControlProxyAPI(self._api_client)
|
|
238
|
+
self._ai_builder = pkg_aibuilder.AiBuilderAPI(self._api_client)
|
|
238
239
|
self._alerts = pkg_sql.AlertsAPI(self._api_client)
|
|
239
240
|
self._alerts_legacy = pkg_sql.AlertsLegacyAPI(self._api_client)
|
|
240
241
|
self._alerts_v2 = pkg_sql.AlertsV2API(self._api_client)
|
|
@@ -256,7 +257,6 @@ class WorkspaceClient:
|
|
|
256
257
|
self._credentials = pkg_catalog.CredentialsAPI(self._api_client)
|
|
257
258
|
self._credentials_manager = pkg_settings.CredentialsManagerAPI(self._api_client)
|
|
258
259
|
self._current_user = pkg_iam.CurrentUserAPI(self._api_client)
|
|
259
|
-
self._custom_llms = pkg_aibuilder.CustomLlmsAPI(self._api_client)
|
|
260
260
|
self._dashboard_widgets = pkg_sql.DashboardWidgetsAPI(self._api_client)
|
|
261
261
|
self._dashboards = pkg_sql.DashboardsAPI(self._api_client)
|
|
262
262
|
self._data_sources = pkg_sql.DataSourcesAPI(self._api_client)
|
|
@@ -265,6 +265,7 @@ class WorkspaceClient:
|
|
|
265
265
|
self._dbsql_permissions = pkg_sql.DbsqlPermissionsAPI(self._api_client)
|
|
266
266
|
self._experiments = pkg_ml.ExperimentsAPI(self._api_client)
|
|
267
267
|
self._external_locations = pkg_catalog.ExternalLocationsAPI(self._api_client)
|
|
268
|
+
self._feature_store = pkg_ml.FeatureStoreAPI(self._api_client)
|
|
268
269
|
self._files = _make_files_client(self._api_client, self._config)
|
|
269
270
|
self._functions = pkg_catalog.FunctionsAPI(self._api_client)
|
|
270
271
|
self._genie = pkg_dashboards.GenieAPI(self._api_client)
|
|
@@ -366,6 +367,11 @@ class WorkspaceClient:
|
|
|
366
367
|
"""These APIs manage access rules on resources in an account."""
|
|
367
368
|
return self._account_access_control_proxy
|
|
368
369
|
|
|
370
|
+
@property
|
|
371
|
+
def ai_builder(self) -> pkg_aibuilder.AiBuilderAPI:
|
|
372
|
+
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
373
|
+
return self._ai_builder
|
|
374
|
+
|
|
369
375
|
@property
|
|
370
376
|
def alerts(self) -> pkg_sql.AlertsAPI:
|
|
371
377
|
"""The alerts API can be used to perform CRUD operations on alerts."""
|
|
@@ -471,11 +477,6 @@ class WorkspaceClient:
|
|
|
471
477
|
"""This API allows retrieving information about currently authenticated user or service principal."""
|
|
472
478
|
return self._current_user
|
|
473
479
|
|
|
474
|
-
@property
|
|
475
|
-
def custom_llms(self) -> pkg_aibuilder.CustomLlmsAPI:
|
|
476
|
-
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
477
|
-
return self._custom_llms
|
|
478
|
-
|
|
479
480
|
@property
|
|
480
481
|
def dashboard_widgets(self) -> pkg_sql.DashboardWidgetsAPI:
|
|
481
482
|
"""This is an evolving API that facilitates the addition and removal of widgets from existing dashboards within the Databricks Workspace."""
|
|
@@ -516,6 +517,11 @@ class WorkspaceClient:
|
|
|
516
517
|
"""An external location is an object that combines a cloud storage path with a storage credential that authorizes access to the cloud storage path."""
|
|
517
518
|
return self._external_locations
|
|
518
519
|
|
|
520
|
+
@property
|
|
521
|
+
def feature_store(self) -> pkg_ml.FeatureStoreAPI:
|
|
522
|
+
"""A feature store is a centralized repository that enables data scientists to find and share features."""
|
|
523
|
+
return self._feature_store
|
|
524
|
+
|
|
519
525
|
@property
|
|
520
526
|
def files(self) -> pkg_files.FilesAPI:
|
|
521
527
|
"""The Files API is a standard HTTP API that allows you to read, write, list, and delete files and directories by referring to their URI."""
|
|
@@ -21,23 +21,85 @@ class CancelCustomLlmOptimizationRunRequest:
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
@dataclass
|
|
24
|
-
class
|
|
24
|
+
class CancelOptimizeResponse:
|
|
25
25
|
def as_dict(self) -> dict:
|
|
26
|
-
"""Serializes the
|
|
26
|
+
"""Serializes the CancelOptimizeResponse into a dictionary suitable for use as a JSON request body."""
|
|
27
27
|
body = {}
|
|
28
28
|
return body
|
|
29
29
|
|
|
30
30
|
def as_shallow_dict(self) -> dict:
|
|
31
|
-
"""Serializes the
|
|
31
|
+
"""Serializes the CancelOptimizeResponse into a shallow dictionary of its immediate attributes."""
|
|
32
32
|
body = {}
|
|
33
33
|
return body
|
|
34
34
|
|
|
35
35
|
@classmethod
|
|
36
|
-
def from_dict(cls, d: Dict[str, Any]) ->
|
|
37
|
-
"""Deserializes the
|
|
36
|
+
def from_dict(cls, d: Dict[str, Any]) -> CancelOptimizeResponse:
|
|
37
|
+
"""Deserializes the CancelOptimizeResponse from a dictionary."""
|
|
38
38
|
return cls()
|
|
39
39
|
|
|
40
40
|
|
|
41
|
+
@dataclass
|
|
42
|
+
class CreateCustomLlmRequest:
|
|
43
|
+
name: str
|
|
44
|
+
"""Name of the custom LLM. Only alphanumeric characters and dashes allowed."""
|
|
45
|
+
|
|
46
|
+
instructions: str
|
|
47
|
+
"""Instructions for the custom LLM to follow"""
|
|
48
|
+
|
|
49
|
+
agent_artifact_path: Optional[str] = None
|
|
50
|
+
"""Optional: UC path for agent artifacts. If you are using a dataset that you only have read
|
|
51
|
+
permissions, please provide a destination path where you have write permissions. Please provide
|
|
52
|
+
this in catalog.schema format."""
|
|
53
|
+
|
|
54
|
+
datasets: Optional[List[Dataset]] = None
|
|
55
|
+
"""Datasets used for training and evaluating the model, not for inference. Currently, only 1
|
|
56
|
+
dataset is accepted."""
|
|
57
|
+
|
|
58
|
+
guidelines: Optional[List[str]] = None
|
|
59
|
+
"""Guidelines for the custom LLM to adhere to"""
|
|
60
|
+
|
|
61
|
+
def as_dict(self) -> dict:
|
|
62
|
+
"""Serializes the CreateCustomLlmRequest into a dictionary suitable for use as a JSON request body."""
|
|
63
|
+
body = {}
|
|
64
|
+
if self.agent_artifact_path is not None:
|
|
65
|
+
body["agent_artifact_path"] = self.agent_artifact_path
|
|
66
|
+
if self.datasets:
|
|
67
|
+
body["datasets"] = [v.as_dict() for v in self.datasets]
|
|
68
|
+
if self.guidelines:
|
|
69
|
+
body["guidelines"] = [v for v in self.guidelines]
|
|
70
|
+
if self.instructions is not None:
|
|
71
|
+
body["instructions"] = self.instructions
|
|
72
|
+
if self.name is not None:
|
|
73
|
+
body["name"] = self.name
|
|
74
|
+
return body
|
|
75
|
+
|
|
76
|
+
def as_shallow_dict(self) -> dict:
|
|
77
|
+
"""Serializes the CreateCustomLlmRequest into a shallow dictionary of its immediate attributes."""
|
|
78
|
+
body = {}
|
|
79
|
+
if self.agent_artifact_path is not None:
|
|
80
|
+
body["agent_artifact_path"] = self.agent_artifact_path
|
|
81
|
+
if self.datasets:
|
|
82
|
+
body["datasets"] = self.datasets
|
|
83
|
+
if self.guidelines:
|
|
84
|
+
body["guidelines"] = self.guidelines
|
|
85
|
+
if self.instructions is not None:
|
|
86
|
+
body["instructions"] = self.instructions
|
|
87
|
+
if self.name is not None:
|
|
88
|
+
body["name"] = self.name
|
|
89
|
+
return body
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, d: Dict[str, Any]) -> CreateCustomLlmRequest:
|
|
93
|
+
"""Deserializes the CreateCustomLlmRequest from a dictionary."""
|
|
94
|
+
return cls(
|
|
95
|
+
agent_artifact_path=d.get("agent_artifact_path", None),
|
|
96
|
+
datasets=_repeated_dict(d, "datasets", Dataset),
|
|
97
|
+
guidelines=d.get("guidelines", None),
|
|
98
|
+
instructions=d.get("instructions", None),
|
|
99
|
+
name=d.get("name", None),
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
41
103
|
@dataclass
|
|
42
104
|
class CustomLlm:
|
|
43
105
|
name: str
|
|
@@ -159,6 +221,24 @@ class Dataset:
|
|
|
159
221
|
return cls(table=_from_dict(d, "table", Table))
|
|
160
222
|
|
|
161
223
|
|
|
224
|
+
@dataclass
|
|
225
|
+
class DeleteCustomLlmResponse:
|
|
226
|
+
def as_dict(self) -> dict:
|
|
227
|
+
"""Serializes the DeleteCustomLlmResponse into a dictionary suitable for use as a JSON request body."""
|
|
228
|
+
body = {}
|
|
229
|
+
return body
|
|
230
|
+
|
|
231
|
+
def as_shallow_dict(self) -> dict:
|
|
232
|
+
"""Serializes the DeleteCustomLlmResponse into a shallow dictionary of its immediate attributes."""
|
|
233
|
+
body = {}
|
|
234
|
+
return body
|
|
235
|
+
|
|
236
|
+
@classmethod
|
|
237
|
+
def from_dict(cls, d: Dict[str, Any]) -> DeleteCustomLlmResponse:
|
|
238
|
+
"""Deserializes the DeleteCustomLlmResponse from a dictionary."""
|
|
239
|
+
return cls()
|
|
240
|
+
|
|
241
|
+
|
|
162
242
|
@dataclass
|
|
163
243
|
class StartCustomLlmOptimizationRunRequest:
|
|
164
244
|
id: Optional[str] = None
|
|
@@ -273,13 +353,13 @@ class UpdateCustomLlmRequest:
|
|
|
273
353
|
)
|
|
274
354
|
|
|
275
355
|
|
|
276
|
-
class
|
|
356
|
+
class AiBuilderAPI:
|
|
277
357
|
"""The Custom LLMs service manages state and powers the UI for the Custom LLM product."""
|
|
278
358
|
|
|
279
359
|
def __init__(self, api_client):
|
|
280
360
|
self._api = api_client
|
|
281
361
|
|
|
282
|
-
def
|
|
362
|
+
def cancel_optimize(self, id: str):
|
|
283
363
|
"""Cancel a Custom LLM Optimization Run.
|
|
284
364
|
|
|
285
365
|
:param id: str
|
|
@@ -294,24 +374,68 @@ class CustomLlmsAPI:
|
|
|
294
374
|
|
|
295
375
|
self._api.do("POST", f"/api/2.0/custom-llms/{id}/optimize/cancel", headers=headers)
|
|
296
376
|
|
|
297
|
-
def
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
:
|
|
301
|
-
|
|
377
|
+
def create_custom_llm(
|
|
378
|
+
self,
|
|
379
|
+
name: str,
|
|
380
|
+
instructions: str,
|
|
381
|
+
*,
|
|
382
|
+
agent_artifact_path: Optional[str] = None,
|
|
383
|
+
datasets: Optional[List[Dataset]] = None,
|
|
384
|
+
guidelines: Optional[List[str]] = None,
|
|
385
|
+
) -> CustomLlm:
|
|
386
|
+
"""Create a Custom LLM.
|
|
387
|
+
|
|
388
|
+
:param name: str
|
|
389
|
+
Name of the custom LLM. Only alphanumeric characters and dashes allowed.
|
|
390
|
+
:param instructions: str
|
|
391
|
+
Instructions for the custom LLM to follow
|
|
392
|
+
:param agent_artifact_path: str (optional)
|
|
393
|
+
Optional: UC path for agent artifacts. If you are using a dataset that you only have read
|
|
394
|
+
permissions, please provide a destination path where you have write permissions. Please provide this
|
|
395
|
+
in catalog.schema format.
|
|
396
|
+
:param datasets: List[:class:`Dataset`] (optional)
|
|
397
|
+
Datasets used for training and evaluating the model, not for inference. Currently, only 1 dataset is
|
|
398
|
+
accepted.
|
|
399
|
+
:param guidelines: List[str] (optional)
|
|
400
|
+
Guidelines for the custom LLM to adhere to
|
|
302
401
|
|
|
303
402
|
:returns: :class:`CustomLlm`
|
|
304
403
|
"""
|
|
305
|
-
|
|
404
|
+
body = {}
|
|
405
|
+
if agent_artifact_path is not None:
|
|
406
|
+
body["agent_artifact_path"] = agent_artifact_path
|
|
407
|
+
if datasets is not None:
|
|
408
|
+
body["datasets"] = [v.as_dict() for v in datasets]
|
|
409
|
+
if guidelines is not None:
|
|
410
|
+
body["guidelines"] = [v for v in guidelines]
|
|
411
|
+
if instructions is not None:
|
|
412
|
+
body["instructions"] = instructions
|
|
413
|
+
if name is not None:
|
|
414
|
+
body["name"] = name
|
|
306
415
|
headers = {
|
|
307
416
|
"Accept": "application/json",
|
|
308
417
|
"Content-Type": "application/json",
|
|
309
418
|
}
|
|
310
419
|
|
|
311
|
-
res = self._api.do("POST",
|
|
420
|
+
res = self._api.do("POST", "/api/2.0/custom-llms", body=body, headers=headers)
|
|
312
421
|
return CustomLlm.from_dict(res)
|
|
313
422
|
|
|
314
|
-
def
|
|
423
|
+
def delete_custom_llm(self, id: str):
|
|
424
|
+
"""Delete a Custom LLM.
|
|
425
|
+
|
|
426
|
+
:param id: str
|
|
427
|
+
The id of the custom llm
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
"""
|
|
431
|
+
|
|
432
|
+
headers = {
|
|
433
|
+
"Accept": "application/json",
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
self._api.do("DELETE", f"/api/2.0/custom-lms/{id}", headers=headers)
|
|
437
|
+
|
|
438
|
+
def get_custom_llm(self, id: str) -> CustomLlm:
|
|
315
439
|
"""Get a Custom LLM.
|
|
316
440
|
|
|
317
441
|
:param id: str
|
|
@@ -327,7 +451,24 @@ class CustomLlmsAPI:
|
|
|
327
451
|
res = self._api.do("GET", f"/api/2.0/custom-llms/{id}", headers=headers)
|
|
328
452
|
return CustomLlm.from_dict(res)
|
|
329
453
|
|
|
330
|
-
def
|
|
454
|
+
def start_optimize(self, id: str) -> CustomLlm:
|
|
455
|
+
"""Start a Custom LLM Optimization Run.
|
|
456
|
+
|
|
457
|
+
:param id: str
|
|
458
|
+
The Id of the tile.
|
|
459
|
+
|
|
460
|
+
:returns: :class:`CustomLlm`
|
|
461
|
+
"""
|
|
462
|
+
|
|
463
|
+
headers = {
|
|
464
|
+
"Accept": "application/json",
|
|
465
|
+
"Content-Type": "application/json",
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
res = self._api.do("POST", f"/api/2.0/custom-llms/{id}/optimize", headers=headers)
|
|
469
|
+
return CustomLlm.from_dict(res)
|
|
470
|
+
|
|
471
|
+
def update_custom_llm(self, id: str, custom_llm: CustomLlm, update_mask: str) -> CustomLlm:
|
|
331
472
|
"""Update a Custom LLM.
|
|
332
473
|
|
|
333
474
|
:param id: str
|
|
@@ -1232,9 +1232,7 @@ class AppsAPI:
|
|
|
1232
1232
|
raise TimeoutError(f"timed out after {timeout}: {status_message}")
|
|
1233
1233
|
|
|
1234
1234
|
def create(self, app: App, *, no_compute: Optional[bool] = None) -> Wait[App]:
|
|
1235
|
-
"""
|
|
1236
|
-
|
|
1237
|
-
Creates a new app.
|
|
1235
|
+
"""Creates a new app.
|
|
1238
1236
|
|
|
1239
1237
|
:param app: :class:`App`
|
|
1240
1238
|
:param no_compute: bool (optional)
|
|
@@ -1260,9 +1258,7 @@ class AppsAPI:
|
|
|
1260
1258
|
return self.create(app=app, no_compute=no_compute).result(timeout=timeout)
|
|
1261
1259
|
|
|
1262
1260
|
def delete(self, name: str) -> App:
|
|
1263
|
-
"""
|
|
1264
|
-
|
|
1265
|
-
Deletes an app.
|
|
1261
|
+
"""Deletes an app.
|
|
1266
1262
|
|
|
1267
1263
|
:param name: str
|
|
1268
1264
|
The name of the app.
|
|
@@ -1278,9 +1274,7 @@ class AppsAPI:
|
|
|
1278
1274
|
return App.from_dict(res)
|
|
1279
1275
|
|
|
1280
1276
|
def deploy(self, app_name: str, app_deployment: AppDeployment) -> Wait[AppDeployment]:
|
|
1281
|
-
"""
|
|
1282
|
-
|
|
1283
|
-
Creates an app deployment for the app with the supplied name.
|
|
1277
|
+
"""Creates an app deployment for the app with the supplied name.
|
|
1284
1278
|
|
|
1285
1279
|
:param app_name: str
|
|
1286
1280
|
The name of the app.
|
|
@@ -1310,9 +1304,7 @@ class AppsAPI:
|
|
|
1310
1304
|
return self.deploy(app_deployment=app_deployment, app_name=app_name).result(timeout=timeout)
|
|
1311
1305
|
|
|
1312
1306
|
def get(self, name: str) -> App:
|
|
1313
|
-
"""
|
|
1314
|
-
|
|
1315
|
-
Retrieves information for the app with the supplied name.
|
|
1307
|
+
"""Retrieves information for the app with the supplied name.
|
|
1316
1308
|
|
|
1317
1309
|
:param name: str
|
|
1318
1310
|
The name of the app.
|
|
@@ -1328,9 +1320,7 @@ class AppsAPI:
|
|
|
1328
1320
|
return App.from_dict(res)
|
|
1329
1321
|
|
|
1330
1322
|
def get_deployment(self, app_name: str, deployment_id: str) -> AppDeployment:
|
|
1331
|
-
"""
|
|
1332
|
-
|
|
1333
|
-
Retrieves information for the app deployment with the supplied name and deployment id.
|
|
1323
|
+
"""Retrieves information for the app deployment with the supplied name and deployment id.
|
|
1334
1324
|
|
|
1335
1325
|
:param app_name: str
|
|
1336
1326
|
The name of the app.
|
|
@@ -1348,9 +1338,7 @@ class AppsAPI:
|
|
|
1348
1338
|
return AppDeployment.from_dict(res)
|
|
1349
1339
|
|
|
1350
1340
|
def get_permission_levels(self, app_name: str) -> GetAppPermissionLevelsResponse:
|
|
1351
|
-
"""
|
|
1352
|
-
|
|
1353
|
-
Gets the permission levels that a user can have on an object.
|
|
1341
|
+
"""Gets the permission levels that a user can have on an object.
|
|
1354
1342
|
|
|
1355
1343
|
:param app_name: str
|
|
1356
1344
|
The app for which to get or manage permissions.
|
|
@@ -1366,9 +1354,7 @@ class AppsAPI:
|
|
|
1366
1354
|
return GetAppPermissionLevelsResponse.from_dict(res)
|
|
1367
1355
|
|
|
1368
1356
|
def get_permissions(self, app_name: str) -> AppPermissions:
|
|
1369
|
-
"""
|
|
1370
|
-
|
|
1371
|
-
Gets the permissions of an app. Apps can inherit permissions from their root object.
|
|
1357
|
+
"""Gets the permissions of an app. Apps can inherit permissions from their root object.
|
|
1372
1358
|
|
|
1373
1359
|
:param app_name: str
|
|
1374
1360
|
The app for which to get or manage permissions.
|
|
@@ -1384,9 +1370,7 @@ class AppsAPI:
|
|
|
1384
1370
|
return AppPermissions.from_dict(res)
|
|
1385
1371
|
|
|
1386
1372
|
def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[App]:
|
|
1387
|
-
"""
|
|
1388
|
-
|
|
1389
|
-
Lists all apps in the workspace.
|
|
1373
|
+
"""Lists all apps in the workspace.
|
|
1390
1374
|
|
|
1391
1375
|
:param page_size: int (optional)
|
|
1392
1376
|
Upper bound for items returned.
|
|
@@ -1417,9 +1401,7 @@ class AppsAPI:
|
|
|
1417
1401
|
def list_deployments(
|
|
1418
1402
|
self, app_name: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
1419
1403
|
) -> Iterator[AppDeployment]:
|
|
1420
|
-
"""
|
|
1421
|
-
|
|
1422
|
-
Lists all app deployments for the app with the supplied name.
|
|
1404
|
+
"""Lists all app deployments for the app with the supplied name.
|
|
1423
1405
|
|
|
1424
1406
|
:param app_name: str
|
|
1425
1407
|
The name of the app.
|
|
@@ -1452,9 +1434,7 @@ class AppsAPI:
|
|
|
1452
1434
|
def set_permissions(
|
|
1453
1435
|
self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None
|
|
1454
1436
|
) -> AppPermissions:
|
|
1455
|
-
"""
|
|
1456
|
-
|
|
1457
|
-
Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
|
|
1437
|
+
"""Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct
|
|
1458
1438
|
permissions if none are specified. Objects can inherit permissions from their root object.
|
|
1459
1439
|
|
|
1460
1440
|
:param app_name: str
|
|
@@ -1475,9 +1455,7 @@ class AppsAPI:
|
|
|
1475
1455
|
return AppPermissions.from_dict(res)
|
|
1476
1456
|
|
|
1477
1457
|
def start(self, name: str) -> Wait[App]:
|
|
1478
|
-
"""Start
|
|
1479
|
-
|
|
1480
|
-
Start the last active deployment of the app in the workspace.
|
|
1458
|
+
"""Start the last active deployment of the app in the workspace.
|
|
1481
1459
|
|
|
1482
1460
|
:param name: str
|
|
1483
1461
|
The name of the app.
|
|
@@ -1499,9 +1477,7 @@ class AppsAPI:
|
|
|
1499
1477
|
return self.start(name=name).result(timeout=timeout)
|
|
1500
1478
|
|
|
1501
1479
|
def stop(self, name: str) -> Wait[App]:
|
|
1502
|
-
"""
|
|
1503
|
-
|
|
1504
|
-
Stops the active deployment of the app in the workspace.
|
|
1480
|
+
"""Stops the active deployment of the app in the workspace.
|
|
1505
1481
|
|
|
1506
1482
|
:param name: str
|
|
1507
1483
|
The name of the app.
|
|
@@ -1523,9 +1499,7 @@ class AppsAPI:
|
|
|
1523
1499
|
return self.stop(name=name).result(timeout=timeout)
|
|
1524
1500
|
|
|
1525
1501
|
def update(self, name: str, app: App) -> App:
|
|
1526
|
-
"""
|
|
1527
|
-
|
|
1528
|
-
Updates the app with the supplied name.
|
|
1502
|
+
"""Updates the app with the supplied name.
|
|
1529
1503
|
|
|
1530
1504
|
:param name: str
|
|
1531
1505
|
The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It
|
|
@@ -1546,9 +1520,7 @@ class AppsAPI:
|
|
|
1546
1520
|
def update_permissions(
|
|
1547
1521
|
self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None
|
|
1548
1522
|
) -> AppPermissions:
|
|
1549
|
-
"""
|
|
1550
|
-
|
|
1551
|
-
Updates the permissions on an app. Apps can inherit permissions from their root object.
|
|
1523
|
+
"""Updates the permissions on an app. Apps can inherit permissions from their root object.
|
|
1552
1524
|
|
|
1553
1525
|
:param app_name: str
|
|
1554
1526
|
The app for which to get or manage permissions.
|