@databricks/sdk-modelserving 0.1.0-dev.1 → 0.1.0-dev.3
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.
- package/dist/v1/client.d.ts +23 -22
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +39 -66
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +2 -2
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +1 -1
- package/dist/v1/model.d.ts +16 -16
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +8 -16
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/utils.d.ts +14 -2
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +19 -1
- package/dist/v1/utils.js.map +1 -1
- package/package.json +6 -5
- package/src/v1/client.ts +104 -136
- package/src/v1/index.ts +9 -9
- package/src/v1/model.ts +17 -32
- package/src/v1/utils.ts +27 -3
package/src/v1/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
ModelServingClient,
|
|
5
5
|
CreateInferenceEndpointWaiter,
|
|
6
6
|
CreateProvisionedThroughputInferenceEndpointWaiter,
|
|
7
7
|
PutInferenceEndpointConfigWaiter,
|
|
@@ -36,7 +36,7 @@ export type {
|
|
|
36
36
|
DataPlaneInfo,
|
|
37
37
|
DatabricksModelServingConfig,
|
|
38
38
|
DeleteInferenceEndpointRequest,
|
|
39
|
-
|
|
39
|
+
DeleteInferenceEndpointResponse,
|
|
40
40
|
EmailNotifications,
|
|
41
41
|
EndpointCoreConfig,
|
|
42
42
|
EndpointCoreConfigOutput,
|
|
@@ -53,31 +53,31 @@ export type {
|
|
|
53
53
|
GetInferenceEndpointSchemaRequest,
|
|
54
54
|
GetOpenApiResponse,
|
|
55
55
|
GetServedModelBuildLogsRequest,
|
|
56
|
-
|
|
56
|
+
GetServedModelBuildLogsResponse,
|
|
57
57
|
GetServedModelLogsRequest,
|
|
58
|
-
|
|
58
|
+
GetServedModelLogsResponse,
|
|
59
59
|
GoogleCloudVertexAiConfig,
|
|
60
60
|
InferenceEndpoint,
|
|
61
61
|
InferenceEndpointDetailed,
|
|
62
62
|
InferenceEndpointState,
|
|
63
63
|
InferenceTableConfig,
|
|
64
64
|
ListInferenceEndpointsRequest,
|
|
65
|
-
|
|
65
|
+
ListInferenceEndpointsResponse,
|
|
66
66
|
ModelDataPlaneInfo,
|
|
67
67
|
OpenAiConfig,
|
|
68
68
|
PaLmConfig,
|
|
69
69
|
PatchInferenceEndpointTagsRequest,
|
|
70
|
-
|
|
70
|
+
PatchInferenceEndpointTagsResponse,
|
|
71
71
|
PayloadTable,
|
|
72
72
|
PendingConfig,
|
|
73
73
|
PiiSettings,
|
|
74
74
|
PtEndpointCoreConfig,
|
|
75
75
|
PtServedModel,
|
|
76
76
|
PutInferenceEndpointAiGatewayRequest,
|
|
77
|
-
|
|
77
|
+
PutInferenceEndpointAiGatewayResponse,
|
|
78
78
|
PutInferenceEndpointConfigRequest,
|
|
79
79
|
PutInferenceEndpointRateLimitsRequest,
|
|
80
|
-
|
|
80
|
+
PutInferenceEndpointRateLimitsResponse,
|
|
81
81
|
PutPtEndpointConfigRequest,
|
|
82
82
|
RateLimit,
|
|
83
83
|
Route,
|
|
@@ -87,6 +87,6 @@ export type {
|
|
|
87
87
|
ServedModelState,
|
|
88
88
|
TrafficConfig,
|
|
89
89
|
UpdateInferenceEndpointNotificationsRequest,
|
|
90
|
-
|
|
90
|
+
UpdateInferenceEndpointNotificationsResponse,
|
|
91
91
|
UsageTrackingConfig,
|
|
92
92
|
} from './model';
|
package/src/v1/model.ts
CHANGED
|
@@ -363,8 +363,8 @@ export interface DeleteInferenceEndpointRequest {
|
|
|
363
363
|
name?: string | undefined;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
// eslint-disable-next-line @typescript-eslint/
|
|
367
|
-
export interface
|
|
366
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
367
|
+
export interface DeleteInferenceEndpointResponse {}
|
|
368
368
|
|
|
369
369
|
export interface EmailNotifications {
|
|
370
370
|
/** A list of email addresses to be notified when an endpoint successfully updates its configuration or state. */
|
|
@@ -564,8 +564,7 @@ export interface GetServedModelBuildLogsRequest {
|
|
|
564
564
|
servedModelName?: string | undefined;
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
|
|
568
|
-
export interface GetServedModelBuildLogsRequest_Response {
|
|
567
|
+
export interface GetServedModelBuildLogsResponse {
|
|
569
568
|
/** The logs associated with building the served entity's environment. */
|
|
570
569
|
logs?: string | undefined;
|
|
571
570
|
}
|
|
@@ -577,8 +576,7 @@ export interface GetServedModelLogsRequest {
|
|
|
577
576
|
servedModelName?: string | undefined;
|
|
578
577
|
}
|
|
579
578
|
|
|
580
|
-
|
|
581
|
-
export interface GetServedModelLogsRequest_Response {
|
|
579
|
+
export interface GetServedModelLogsResponse {
|
|
582
580
|
/** The most recent log lines of the model server processing invocation requests. */
|
|
583
581
|
logs?: string | undefined;
|
|
584
582
|
}
|
|
@@ -727,8 +725,7 @@ export interface InferenceTableConfig {
|
|
|
727
725
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
728
726
|
export interface ListInferenceEndpointsRequest {}
|
|
729
727
|
|
|
730
|
-
|
|
731
|
-
export interface ListInferenceEndpointsRequest_Response {
|
|
728
|
+
export interface ListInferenceEndpointsResponse {
|
|
732
729
|
/** The list of endpoints. */
|
|
733
730
|
endpoints?: InferenceEndpoint[] | undefined;
|
|
734
731
|
}
|
|
@@ -842,8 +839,7 @@ export interface PatchInferenceEndpointTagsRequest {
|
|
|
842
839
|
deleteTags?: string[] | undefined;
|
|
843
840
|
}
|
|
844
841
|
|
|
845
|
-
|
|
846
|
-
export interface PatchInferenceEndpointTagsRequest_Response {
|
|
842
|
+
export interface PatchInferenceEndpointTagsResponse {
|
|
847
843
|
tags?: EndpointTag[] | undefined;
|
|
848
844
|
}
|
|
849
845
|
|
|
@@ -924,8 +920,7 @@ export interface PutInferenceEndpointAiGatewayRequest {
|
|
|
924
920
|
fallbackConfig?: FallbackConfig | undefined;
|
|
925
921
|
}
|
|
926
922
|
|
|
927
|
-
|
|
928
|
-
export interface PutInferenceEndpointAiGatewayRequest_Response {
|
|
923
|
+
export interface PutInferenceEndpointAiGatewayResponse {
|
|
929
924
|
/**
|
|
930
925
|
* Configuration to enable usage tracking using system tables.
|
|
931
926
|
* These tables allow you to monitor operational usage on endpoints and their associated costs.
|
|
@@ -972,8 +967,7 @@ export interface PutInferenceEndpointRateLimitsRequest {
|
|
|
972
967
|
rateLimits?: RateLimit[] | undefined;
|
|
973
968
|
}
|
|
974
969
|
|
|
975
|
-
|
|
976
|
-
export interface PutInferenceEndpointRateLimitsRequest_Response {
|
|
970
|
+
export interface PutInferenceEndpointRateLimitsResponse {
|
|
977
971
|
/** The list of endpoint rate limits. */
|
|
978
972
|
rateLimits?: RateLimit[] | undefined;
|
|
979
973
|
}
|
|
@@ -1083,8 +1077,7 @@ export interface UpdateInferenceEndpointNotificationsRequest {
|
|
|
1083
1077
|
emailNotifications?: EmailNotifications | undefined;
|
|
1084
1078
|
}
|
|
1085
1079
|
|
|
1086
|
-
|
|
1087
|
-
export interface UpdateInferenceEndpointNotificationsRequest_Response {
|
|
1080
|
+
export interface UpdateInferenceEndpointNotificationsResponse {
|
|
1088
1081
|
name?: string | undefined;
|
|
1089
1082
|
emailNotifications?: EmailNotifications | undefined;
|
|
1090
1083
|
}
|
|
@@ -1301,8 +1294,7 @@ export const unmarshalDatabricksModelServingConfigSchema: z.ZodType<DatabricksMo
|
|
|
1301
1294
|
databricksApiTokenPlaintext: d.databricks_api_token_plaintext,
|
|
1302
1295
|
}));
|
|
1303
1296
|
|
|
1304
|
-
|
|
1305
|
-
export const unmarshalDeleteInferenceEndpointRequest_ResponseSchema: z.ZodType<DeleteInferenceEndpointRequest_Response> =
|
|
1297
|
+
export const unmarshalDeleteInferenceEndpointResponseSchema: z.ZodType<DeleteInferenceEndpointResponse> =
|
|
1306
1298
|
z.object({});
|
|
1307
1299
|
|
|
1308
1300
|
export const unmarshalEmailNotificationsSchema: z.ZodType<EmailNotifications> =
|
|
@@ -1460,8 +1452,7 @@ export const unmarshalFoundationModelSchema: z.ZodType<FoundationModel> = z
|
|
|
1460
1452
|
description: d.description,
|
|
1461
1453
|
}));
|
|
1462
1454
|
|
|
1463
|
-
|
|
1464
|
-
export const unmarshalGetServedModelBuildLogsRequest_ResponseSchema: z.ZodType<GetServedModelBuildLogsRequest_Response> =
|
|
1455
|
+
export const unmarshalGetServedModelBuildLogsResponseSchema: z.ZodType<GetServedModelBuildLogsResponse> =
|
|
1465
1456
|
z
|
|
1466
1457
|
.object({
|
|
1467
1458
|
logs: z.string().optional(),
|
|
@@ -1470,8 +1461,7 @@ export const unmarshalGetServedModelBuildLogsRequest_ResponseSchema: z.ZodType<G
|
|
|
1470
1461
|
logs: d.logs,
|
|
1471
1462
|
}));
|
|
1472
1463
|
|
|
1473
|
-
|
|
1474
|
-
export const unmarshalGetServedModelLogsRequest_ResponseSchema: z.ZodType<GetServedModelLogsRequest_Response> =
|
|
1464
|
+
export const unmarshalGetServedModelLogsResponseSchema: z.ZodType<GetServedModelLogsResponse> =
|
|
1475
1465
|
z
|
|
1476
1466
|
.object({
|
|
1477
1467
|
logs: z.string().optional(),
|
|
@@ -1616,8 +1606,7 @@ export const unmarshalInferenceTableConfigSchema: z.ZodType<InferenceTableConfig
|
|
|
1616
1606
|
enabled: d.enabled,
|
|
1617
1607
|
}));
|
|
1618
1608
|
|
|
1619
|
-
|
|
1620
|
-
export const unmarshalListInferenceEndpointsRequest_ResponseSchema: z.ZodType<ListInferenceEndpointsRequest_Response> =
|
|
1609
|
+
export const unmarshalListInferenceEndpointsResponseSchema: z.ZodType<ListInferenceEndpointsResponse> =
|
|
1621
1610
|
z
|
|
1622
1611
|
.object({
|
|
1623
1612
|
endpoints: z
|
|
@@ -1676,8 +1665,7 @@ export const unmarshalPaLmConfigSchema: z.ZodType<PaLmConfig> = z
|
|
|
1676
1665
|
palmApiKeyPlaintext: d.palm_api_key_plaintext,
|
|
1677
1666
|
}));
|
|
1678
1667
|
|
|
1679
|
-
|
|
1680
|
-
export const unmarshalPatchInferenceEndpointTagsRequest_ResponseSchema: z.ZodType<PatchInferenceEndpointTagsRequest_Response> =
|
|
1668
|
+
export const unmarshalPatchInferenceEndpointTagsResponseSchema: z.ZodType<PatchInferenceEndpointTagsResponse> =
|
|
1681
1669
|
z
|
|
1682
1670
|
.object({
|
|
1683
1671
|
tags: z.array(z.lazy(() => unmarshalEndpointTagSchema)).optional(),
|
|
@@ -1731,8 +1719,7 @@ export const unmarshalPiiSettingsSchema: z.ZodType<PiiSettings> = z
|
|
|
1731
1719
|
behavior: d.behavior,
|
|
1732
1720
|
}));
|
|
1733
1721
|
|
|
1734
|
-
|
|
1735
|
-
export const unmarshalPutInferenceEndpointAiGatewayRequest_ResponseSchema: z.ZodType<PutInferenceEndpointAiGatewayRequest_Response> =
|
|
1722
|
+
export const unmarshalPutInferenceEndpointAiGatewayResponseSchema: z.ZodType<PutInferenceEndpointAiGatewayResponse> =
|
|
1736
1723
|
z
|
|
1737
1724
|
.object({
|
|
1738
1725
|
usage_tracking_config: z
|
|
@@ -1755,8 +1742,7 @@ export const unmarshalPutInferenceEndpointAiGatewayRequest_ResponseSchema: z.Zod
|
|
|
1755
1742
|
fallbackConfig: d.fallback_config,
|
|
1756
1743
|
}));
|
|
1757
1744
|
|
|
1758
|
-
|
|
1759
|
-
export const unmarshalPutInferenceEndpointRateLimitsRequest_ResponseSchema: z.ZodType<PutInferenceEndpointRateLimitsRequest_Response> =
|
|
1745
|
+
export const unmarshalPutInferenceEndpointRateLimitsResponseSchema: z.ZodType<PutInferenceEndpointRateLimitsResponse> =
|
|
1760
1746
|
z
|
|
1761
1747
|
.object({
|
|
1762
1748
|
rate_limits: z.array(z.lazy(() => unmarshalRateLimitSchema)).optional(),
|
|
@@ -1882,8 +1868,7 @@ export const unmarshalTrafficConfigSchema: z.ZodType<TrafficConfig> = z
|
|
|
1882
1868
|
routes: d.routes,
|
|
1883
1869
|
}));
|
|
1884
1870
|
|
|
1885
|
-
|
|
1886
|
-
export const unmarshalUpdateInferenceEndpointNotificationsRequest_ResponseSchema: z.ZodType<UpdateInferenceEndpointNotificationsRequest_Response> =
|
|
1871
|
+
export const unmarshalUpdateInferenceEndpointNotificationsResponseSchema: z.ZodType<UpdateInferenceEndpointNotificationsResponse> =
|
|
1887
1872
|
z
|
|
1888
1873
|
.object({
|
|
1889
1874
|
name: z.string().optional(),
|
package/src/v1/utils.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
import {execute} from '@databricks/sdk-core/
|
|
3
|
+
import type {Options} from '@databricks/sdk-core/ops';
|
|
4
|
+
import {execute, retryOn} from '@databricks/sdk-core/ops';
|
|
5
5
|
import {ApiError} from '@databricks/sdk-core/apierror';
|
|
6
6
|
import type {
|
|
7
7
|
HttpClient,
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
} from '@databricks/sdk-core/http';
|
|
11
11
|
import type {Logger} from '@databricks/sdk-core/logger';
|
|
12
12
|
import type {CallOptions} from '@databricks/sdk-options/call';
|
|
13
|
+
import type {LroOptions} from '@databricks/sdk-options/lro';
|
|
13
14
|
import JSONBig from 'json-bigint';
|
|
14
15
|
import type {z} from 'zod';
|
|
15
16
|
|
|
@@ -30,7 +31,7 @@ export interface HttpCallOptions {
|
|
|
30
31
|
* API from the executor's internal type so they can diverge.
|
|
31
32
|
*/
|
|
32
33
|
export async function executeCall(
|
|
33
|
-
call:
|
|
34
|
+
call: (signal?: AbortSignal) => Promise<void>,
|
|
34
35
|
options?: CallOptions
|
|
35
36
|
): Promise<void> {
|
|
36
37
|
const opts: Options = {
|
|
@@ -43,6 +44,29 @@ export async function executeCall(
|
|
|
43
44
|
return execute(options?.signal, call, opts);
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Sentinel thrown by a polling call to signal that the operation has not
|
|
49
|
+
* yet reached a terminal state. {@link executeWait} treats this error as
|
|
50
|
+
* retriable; any other error aborts the wait.
|
|
51
|
+
*/
|
|
52
|
+
export class StillRunningError extends Error {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Polls until the call returns without throwing {@link StillRunningError}.
|
|
56
|
+
* Abort and overall-deadline behavior come from the supplied LroOptions.
|
|
57
|
+
*/
|
|
58
|
+
export async function executeWait(
|
|
59
|
+
call: (signal?: AbortSignal) => Promise<void>,
|
|
60
|
+
options?: LroOptions
|
|
61
|
+
): Promise<void> {
|
|
62
|
+
const opts: Options = {
|
|
63
|
+
...(options?.timeout !== undefined && {timeout: options.timeout}),
|
|
64
|
+
retrier: () =>
|
|
65
|
+
retryOn({}, (err: Error) => err instanceof StillRunningError),
|
|
66
|
+
};
|
|
67
|
+
return execute(options?.signal, call, opts);
|
|
68
|
+
}
|
|
69
|
+
|
|
46
70
|
async function readAll(
|
|
47
71
|
body: ReadableStream<Uint8Array> | null
|
|
48
72
|
): Promise<Uint8Array> {
|