@databricks/sdk-forecasting 0.33.0 → 0.35.0
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/package.js +7 -0
- package/dist/package.js.map +1 -0
- package/dist/v1/client.d.ts +33 -29
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +121 -155
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +3 -7
- package/dist/v1/index.js +4 -7
- package/dist/v1/model.d.ts +73 -74
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +57 -69
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.d.ts +21 -17
- package/dist/v1/transport.d.ts.map +1 -1
- package/dist/v1/transport.js +60 -69
- package/dist/v1/transport.js.map +1 -1
- package/dist/v1/utils.d.ts +21 -18
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +90 -118
- package/dist/v1/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/v1/index.d.ts.map +0 -1
- package/dist/v1/index.js.map +0 -1
package/dist/package.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
package/dist/v1/client.d.ts
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { CreateForecastingExperimentRequest, ForecastingExperiment, GetForecastingExperimentRequest } from "./model.js";
|
|
2
|
+
import { CallOptions } from "@databricks/sdk-options/call";
|
|
3
|
+
import { ClientOptions } from "@databricks/sdk-options/client";
|
|
4
|
+
import { LroOptions } from "@databricks/sdk-options/lro";
|
|
5
|
+
|
|
6
|
+
//#region src/v1/client.d.ts
|
|
7
|
+
declare class ForecastingClient {
|
|
8
|
+
private readonly options;
|
|
9
|
+
private readonly logger;
|
|
10
|
+
private readonly userAgent;
|
|
11
|
+
private config;
|
|
12
|
+
constructor(options: ClientOptions);
|
|
13
|
+
private resolveConfig;
|
|
14
|
+
/** Creates a serverless forecasting experiment. Returns the experiment ID. */
|
|
15
|
+
private createForecastingExperimentBase;
|
|
16
|
+
/** Creates a serverless forecasting experiment. Returns the experiment ID. */
|
|
17
|
+
createForecastingExperiment(req: CreateForecastingExperimentRequest, options?: CallOptions): Promise<CreateForecastingExperimentWaiter>;
|
|
18
|
+
/** Public RPC to get forecasting experiment */
|
|
19
|
+
getForecastingExperiment(req: GetForecastingExperimentRequest, options?: CallOptions): Promise<ForecastingExperiment>;
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
declare class CreateForecastingExperimentWaiter {
|
|
22
|
+
private readonly client;
|
|
23
|
+
readonly experimentId: string;
|
|
24
|
+
constructor(client: ForecastingClient, experimentId: string);
|
|
25
|
+
/**
|
|
26
|
+
* Polls until the operation reaches a terminal state.
|
|
27
|
+
*
|
|
28
|
+
* Throws if a failure state is reached.
|
|
29
|
+
*/
|
|
30
|
+
wait(options?: LroOptions): Promise<ForecastingExperiment>;
|
|
31
|
+
/** Checks whether the operation has reached a terminal state. */
|
|
32
|
+
done(options?: CallOptions): Promise<boolean>;
|
|
31
33
|
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { CreateForecastingExperimentWaiter, ForecastingClient };
|
|
32
36
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/v1/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../src/v1/client.ts"],"mappings":";;;;;;cAwCa,iBAAA;EAAA,iBACM,OAAA;EAAA,iBACA,MAAA;EAAA,iBAIA,SAAA;EAAA,QAIT,MAAA;cAEI,OAAA,EAAS,aAAA;EAAA,QAUb,aAAA;EA4CI;EAAA,QAtCE,+BAAA;EAuCX;EAHG,2BAAA,CACJ,GAAA,EAAK,kCAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,iCAAA;EAaC;EAFN,wBAAA,CACJ,GAAA,EAAK,+BAAA,EACL,OAAA,GAAU,WAAA,GACT,OAAA,CAAQ,qBAAA;AAAA;AAAA,cA0BA,iCAAA;EAAA,iBAEQ,MAAA;EAAA,SACR,YAAA;cADQ,MAAA,EAAQ,iBAAA,EAChB,YAAA;EAxGM;;;;;EAgHX,IAAA,CAAK,OAAA,GAAU,UAAA,GAAa,OAAA,CAAQ,qBAAA;EA1F5B;EAgIR,IAAA,CAAK,OAAA,GAAU,WAAA,GAAc,OAAA;AAAA"}
|
package/dist/v1/client.js
CHANGED
|
@@ -1,158 +1,124 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { resolveClientConfig } from "./transport.js";
|
|
2
|
+
import { StillRunningError, buildHttpRequest, executeCall, executeHttpCall, executeWait, marshalRequest, parseResponse } from "./utils.js";
|
|
3
|
+
import { name, version } from "../package.js";
|
|
4
|
+
import { ForecastingExperiment_State, marshalCreateForecastingExperimentRequestSchema, unmarshalCreateForecastingExperimentResponseSchema, unmarshalForecastingExperimentSchema } from "./model.js";
|
|
5
|
+
import { VERSION } from "@databricks/sdk-auth";
|
|
6
|
+
import { createDefault } from "@databricks/sdk-core/clientinfo";
|
|
7
|
+
import { NoOpLogger } from "@databricks/sdk-core/logger";
|
|
8
|
+
|
|
9
|
+
//#region src/v1/client.ts
|
|
10
10
|
const PACKAGE_SEGMENT = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
key: "sdk-js-" + name.replace(/^@[^/]+\/sdk-/, ""),
|
|
12
|
+
value: version
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
case ForecastingExperiment_State.FAILED:
|
|
125
|
-
case ForecastingExperiment_State.CANCELLED: {
|
|
126
|
-
const msg = '(no message)';
|
|
127
|
-
throw new Error(`terminal state ${status}: ${msg}`);
|
|
128
|
-
}
|
|
129
|
-
default:
|
|
130
|
-
throw new StillRunningError();
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
await executeWait(call, options);
|
|
134
|
-
if (result === undefined) {
|
|
135
|
-
throw new Error('operation completed without a result.');
|
|
136
|
-
}
|
|
137
|
-
return result;
|
|
138
|
-
}
|
|
139
|
-
/** Checks whether the operation has reached a terminal state. */
|
|
140
|
-
async done(options) {
|
|
141
|
-
const pollResp = await this.client.getForecastingExperiment({
|
|
142
|
-
experimentId: this.experimentId,
|
|
143
|
-
}, options);
|
|
144
|
-
const status = pollResp.state;
|
|
145
|
-
if (status === undefined) {
|
|
146
|
-
throw new Error('response missing required status field');
|
|
147
|
-
}
|
|
148
|
-
switch (status) {
|
|
149
|
-
case ForecastingExperiment_State.SUCCEEDED:
|
|
150
|
-
case ForecastingExperiment_State.FAILED:
|
|
151
|
-
case ForecastingExperiment_State.CANCELLED:
|
|
152
|
-
return true;
|
|
153
|
-
default:
|
|
154
|
-
return false;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
14
|
+
var ForecastingClient = class {
|
|
15
|
+
options;
|
|
16
|
+
logger;
|
|
17
|
+
userAgent;
|
|
18
|
+
config;
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.options = options;
|
|
21
|
+
this.logger = options.logger ?? new NoOpLogger();
|
|
22
|
+
this.userAgent = createDefault().with(PACKAGE_SEGMENT).with({
|
|
23
|
+
key: "sdk-js-auth",
|
|
24
|
+
value: VERSION
|
|
25
|
+
}).with({
|
|
26
|
+
key: "auth",
|
|
27
|
+
value: options.credentials?.name() ?? "default"
|
|
28
|
+
}).toString();
|
|
29
|
+
}
|
|
30
|
+
resolveConfig() {
|
|
31
|
+
this.config ??= resolveClientConfig(this.options);
|
|
32
|
+
return this.config;
|
|
33
|
+
}
|
|
34
|
+
/** Creates a serverless forecasting experiment. Returns the experiment ID. */
|
|
35
|
+
async createForecastingExperimentBase(req, options) {
|
|
36
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
37
|
+
const url = `${host}/api/2.0/automl/create-forecasting-experiment`;
|
|
38
|
+
const body = marshalRequest(req, marshalCreateForecastingExperimentRequestSchema);
|
|
39
|
+
let resp;
|
|
40
|
+
const call = async (callSignal) => {
|
|
41
|
+
const headers = new Headers({ "Content-Type": "application/json" });
|
|
42
|
+
if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
|
|
43
|
+
headers.set("User-Agent", this.userAgent);
|
|
44
|
+
resp = parseResponse(await executeHttpCall({
|
|
45
|
+
request: buildHttpRequest("POST", url, headers, callSignal, body),
|
|
46
|
+
httpClient,
|
|
47
|
+
logger: this.logger
|
|
48
|
+
}), unmarshalCreateForecastingExperimentResponseSchema);
|
|
49
|
+
};
|
|
50
|
+
await executeCall(call, options);
|
|
51
|
+
if (resp === void 0) throw new Error("operation completed without a result.");
|
|
52
|
+
return resp;
|
|
53
|
+
}
|
|
54
|
+
/** Creates a serverless forecasting experiment. Returns the experiment ID. */
|
|
55
|
+
async createForecastingExperiment(req, options) {
|
|
56
|
+
const resp = await this.createForecastingExperimentBase(req, options);
|
|
57
|
+
if (resp.experimentId === void 0) throw new Error("response field experimentId required for polling is missing");
|
|
58
|
+
return new CreateForecastingExperimentWaiter(this, resp.experimentId);
|
|
59
|
+
}
|
|
60
|
+
/** Public RPC to get forecasting experiment */
|
|
61
|
+
async getForecastingExperiment(req, options) {
|
|
62
|
+
const { host, workspaceId, httpClient } = await this.resolveConfig();
|
|
63
|
+
const url = `${host}/api/2.0/automl/get-forecasting-experiment/${req.experimentId ?? ""}`;
|
|
64
|
+
let resp;
|
|
65
|
+
const call = async (callSignal) => {
|
|
66
|
+
const headers = new Headers();
|
|
67
|
+
if (workspaceId !== void 0) headers.set("X-Databricks-Workspace-Id", workspaceId);
|
|
68
|
+
headers.set("User-Agent", this.userAgent);
|
|
69
|
+
resp = parseResponse(await executeHttpCall({
|
|
70
|
+
request: buildHttpRequest("GET", url, headers, callSignal),
|
|
71
|
+
httpClient,
|
|
72
|
+
logger: this.logger
|
|
73
|
+
}), unmarshalForecastingExperimentSchema);
|
|
74
|
+
};
|
|
75
|
+
await executeCall(call, options);
|
|
76
|
+
if (resp === void 0) throw new Error("operation completed without a result.");
|
|
77
|
+
return resp;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var CreateForecastingExperimentWaiter = class {
|
|
81
|
+
constructor(client, experimentId) {
|
|
82
|
+
this.client = client;
|
|
83
|
+
this.experimentId = experimentId;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Polls until the operation reaches a terminal state.
|
|
87
|
+
*
|
|
88
|
+
* Throws if a failure state is reached.
|
|
89
|
+
*/
|
|
90
|
+
async wait(options) {
|
|
91
|
+
let result;
|
|
92
|
+
const call = async (callSignal) => {
|
|
93
|
+
const pollResp = await this.client.getForecastingExperiment({ experimentId: this.experimentId }, callSignal !== void 0 ? { signal: callSignal } : void 0);
|
|
94
|
+
const status = pollResp.state;
|
|
95
|
+
if (status === void 0) throw new Error("response missing required status field");
|
|
96
|
+
switch (status) {
|
|
97
|
+
case ForecastingExperiment_State.SUCCEEDED:
|
|
98
|
+
result = pollResp;
|
|
99
|
+
return;
|
|
100
|
+
case ForecastingExperiment_State.FAILED:
|
|
101
|
+
case ForecastingExperiment_State.CANCELLED: throw new Error(`terminal state ${status}: (no message)`);
|
|
102
|
+
default: throw new StillRunningError();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
await executeWait(call, options);
|
|
106
|
+
if (result === void 0) throw new Error("operation completed without a result.");
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
109
|
+
/** Checks whether the operation has reached a terminal state. */
|
|
110
|
+
async done(options) {
|
|
111
|
+
const status = (await this.client.getForecastingExperiment({ experimentId: this.experimentId }, options)).state;
|
|
112
|
+
if (status === void 0) throw new Error("response missing required status field");
|
|
113
|
+
switch (status) {
|
|
114
|
+
case ForecastingExperiment_State.SUCCEEDED:
|
|
115
|
+
case ForecastingExperiment_State.FAILED:
|
|
116
|
+
case ForecastingExperiment_State.CANCELLED: return true;
|
|
117
|
+
default: return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
//#endregion
|
|
123
|
+
export { CreateForecastingExperimentWaiter, ForecastingClient };
|
|
158
124
|
//# sourceMappingURL=client.js.map
|
package/dist/v1/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/v1/client.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAKvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,OAAO,MAAM,oBAAoB,CAAC,OAAM,IAAI,EAAE,MAAM,EAAC,CAAC;AAO7D,OAAO,EACL,2BAA2B,EA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jE,KAAK,CAAC,IAAI,CAAC,OAAqB;QAC9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,wBAAwB,CACzD;YACE,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,EACD,OAAO,CACR,CAAC;QAEF,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC9B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QAED,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,2BAA2B,CAAC,SAAS,CAAC;YAC3C,KAAK,2BAA2B,CAAC,MAAM,CAAC;YACxC,KAAK,2BAA2B,CAAC,SAAS;gBACxC,OAAO,IAAI,CAAC;YACd;gBACE,OAAO,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["pkgJson.version","AUTH_VERSION"],"sources":["../../src/v1/client.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';\nimport {createDefault} from '@databricks/sdk-core/clientinfo';\nimport type {Logger} from '@databricks/sdk-core/logger';\nimport {NoOpLogger} from '@databricks/sdk-core/logger';\nimport type {CallOptions} from '@databricks/sdk-options/call';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\nimport type {LroOptions} from '@databricks/sdk-options/lro';\nimport type {ResolvedClientConfig} from './transport';\nimport {resolveClientConfig} from './transport';\nimport {\n buildHttpRequest,\n executeCall,\n executeHttpCall,\n marshalRequest,\n parseResponse,\n executeWait,\n StillRunningError,\n} from './utils';\nimport pkgJson from '../../package.json' with {type: 'json'};\nimport type {\n CreateForecastingExperimentRequest,\n CreateForecastingExperimentResponse,\n ForecastingExperiment,\n GetForecastingExperimentRequest,\n} from './model';\nimport {\n ForecastingExperiment_State,\n marshalCreateForecastingExperimentRequestSchema,\n unmarshalCreateForecastingExperimentResponseSchema,\n unmarshalForecastingExperimentSchema,\n} from './model';\n\n// Package identity segment for this client to be used in the User-Agent header.\nconst PACKAGE_SEGMENT = {\n key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\\/sdk-/, ''),\n value: pkgJson.version,\n};\n\nexport class ForecastingClient {\n private readonly options: ClientOptions;\n private readonly logger: Logger;\n // User-Agent header value. Composed once at construction from\n // createDefault() merged with this package's identity and the active\n // credential's name.\n private readonly userAgent: string;\n // Memoized configuration. The profile is resolved once, lazily, on the first\n // request, then reused; host, workspaceId/accountId, and credentials are\n // filled from it when not set explicitly on the options.\n private config: Promise<ResolvedClientConfig> | undefined;\n\n constructor(options: ClientOptions) {\n this.options = options;\n this.logger = options.logger ?? new NoOpLogger();\n const info = createDefault()\n .with(PACKAGE_SEGMENT)\n .with({key: 'sdk-js-auth', value: AUTH_VERSION})\n .with({key: 'auth', value: options.credentials?.name() ?? 'default'});\n this.userAgent = info.toString();\n }\n\n private resolveConfig(): Promise<ResolvedClientConfig> {\n this.config ??= resolveClientConfig(this.options);\n return this.config;\n }\n\n /** Creates a serverless forecasting experiment. Returns the experiment ID. */\n private async createForecastingExperimentBase(\n req: CreateForecastingExperimentRequest,\n options?: CallOptions\n ): Promise<CreateForecastingExperimentResponse> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/automl/create-forecasting-experiment`;\n const body = marshalRequest(\n req,\n marshalCreateForecastingExperimentRequestSchema\n );\n let resp: CreateForecastingExperimentResponse | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers({'Content-Type': 'application/json'});\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(\n respBody,\n unmarshalCreateForecastingExperimentResponseSchema\n );\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n\n /** Creates a serverless forecasting experiment. Returns the experiment ID. */\n async createForecastingExperiment(\n req: CreateForecastingExperimentRequest,\n options?: CallOptions\n ): Promise<CreateForecastingExperimentWaiter> {\n const resp = await this.createForecastingExperimentBase(req, options);\n if (resp.experimentId === undefined) {\n throw new Error(\n 'response field experimentId required for polling is missing'\n );\n }\n return new CreateForecastingExperimentWaiter(this, resp.experimentId);\n }\n\n /** Public RPC to get forecasting experiment */\n async getForecastingExperiment(\n req: GetForecastingExperimentRequest,\n options?: CallOptions\n ): Promise<ForecastingExperiment> {\n const {host, workspaceId, httpClient} = await this.resolveConfig();\n const url = `${host}/api/2.0/automl/get-forecasting-experiment/${req.experimentId ?? ''}`;\n let resp: ForecastingExperiment | undefined;\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const headers = new Headers();\n if (workspaceId !== undefined) {\n headers.set('X-Databricks-Workspace-Id', workspaceId);\n }\n headers.set('User-Agent', this.userAgent);\n const httpReq = buildHttpRequest('GET', url, headers, callSignal);\n const respBody = await executeHttpCall({\n request: httpReq,\n httpClient,\n logger: this.logger,\n });\n resp = parseResponse(respBody, unmarshalForecastingExperimentSchema);\n };\n await executeCall(call, options);\n if (resp === undefined) {\n throw new Error('operation completed without a result.');\n }\n return resp;\n }\n}\n\nexport class CreateForecastingExperimentWaiter {\n constructor(\n private readonly client: ForecastingClient,\n readonly experimentId: string\n ) {}\n\n /**\n * Polls until the operation reaches a terminal state.\n *\n * Throws if a failure state is reached.\n */\n async wait(options?: LroOptions): Promise<ForecastingExperiment> {\n let result: ForecastingExperiment | undefined;\n\n const call = async (callSignal?: AbortSignal): Promise<void> => {\n const pollResp = await this.client.getForecastingExperiment(\n {\n experimentId: this.experimentId,\n },\n callSignal !== undefined ? {signal: callSignal} : undefined\n );\n\n const status = pollResp.state;\n if (status === undefined) {\n throw new Error('response missing required status field');\n }\n\n switch (status) {\n case ForecastingExperiment_State.SUCCEEDED:\n result = pollResp;\n return;\n case ForecastingExperiment_State.FAILED:\n case ForecastingExperiment_State.CANCELLED: {\n const msg = '(no message)';\n throw new Error(`terminal state ${status}: ${msg}`);\n }\n default:\n throw new StillRunningError();\n }\n };\n\n await executeWait(call, options);\n if (result === undefined) {\n throw new Error('operation completed without a result.');\n }\n return result;\n }\n\n /** Checks whether the operation has reached a terminal state. */\n async done(options?: CallOptions): Promise<boolean> {\n const pollResp = await this.client.getForecastingExperiment(\n {\n experimentId: this.experimentId,\n },\n options\n );\n\n const status = pollResp.state;\n if (status === undefined) {\n throw new Error('response missing required status field');\n }\n\n switch (status) {\n case ForecastingExperiment_State.SUCCEEDED:\n case ForecastingExperiment_State.FAILED:\n case ForecastingExperiment_State.CANCELLED:\n return true;\n default:\n return false;\n }\n }\n}\n"],"mappings":";;;;;;;;;AAmCA,MAAM,kBAAkB;CACtB,KAAK,iBAAyB,QAAQ,iBAAiB,GAAG;CAC1D,OAAOA;CACR;AAED,IAAa,oBAAb,MAA+B;CAC7B,AAAiB;CACjB,AAAiB;CAIjB,AAAiB;CAIjB,AAAQ;CAER,YAAY,SAAwB;AAClC,OAAK,UAAU;AACf,OAAK,SAAS,QAAQ,UAAU,IAAI,YAAY;AAKhD,OAAK,YAJQ,eAAe,CACzB,KAAK,gBAAgB,CACrB,KAAK;GAAC,KAAK;GAAe,OAAOC;GAAa,CAAC,CAC/C,KAAK;GAAC,KAAK;GAAQ,OAAO,QAAQ,aAAa,MAAM,IAAI;GAAU,CAAC,CACjD,UAAU;;CAGlC,AAAQ,gBAA+C;AACrD,OAAK,WAAW,oBAAoB,KAAK,QAAQ;AACjD,SAAO,KAAK;;;CAId,MAAc,gCACZ,KACA,SAC8C;EAC9C,MAAM,EAAC,MAAM,aAAa,eAAc,MAAM,KAAK,eAAe;EAClE,MAAM,MAAM,GAAG,KAAK;EACpB,MAAM,OAAO,eACX,KACA,gDACD;EACD,IAAI;EACJ,MAAM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EAC/D,IAAI;EAEJ,MAAM,OAAO,OAAO,eAA4C;GAC9D,MAAM,WAAW,MAAM,KAAK,OAAO,yBACjC,EACE,cAAc,KAAK,cACpB,EACD,eAAe,SAAY,EAAC,QAAQ,YAAW,GAAG,OACnD;GAED,MAAM,SAAS,SAAS;AACxB,OAAI,WAAW,OACb,OAAM,IAAI,MAAM,yCAAyC;AAG3D,WAAQ,QAAR;IACE,KAAK,4BAA4B;AAC/B,cAAS;AACT;IACF,KAAK,4BAA4B;IACjC,KAAK,4BAA4B,UAE/B,OAAM,IAAI,MAAM,kBAAkB,OAAO,gBAAU;IAErD,QACE,OAAM,IAAI,mBAAmB;;;AAInC,QAAM,YAAY,MAAM,QAAQ;AAChC,MAAI,WAAW,OACb,OAAM,IAAI,MAAM,wCAAwC;AAE1D,SAAO;;;CAIT,MAAM,KAAK,SAAyC;EAQlD,MAAM,UAPW,MAAM,KAAK,OAAO,yBACjC,EACE,cAAc,KAAK,cACpB,EACD,QACD,EAEuB;AACxB,MAAI,WAAW,OACb,OAAM,IAAI,MAAM,yCAAyC;AAG3D,UAAQ,QAAR;GACE,KAAK,4BAA4B;GACjC,KAAK,4BAA4B;GACjC,KAAK,4BAA4B,UAC/B,QAAO;GACT,QACE,QAAO"}
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { ForecastingClient, CreateForecastingExperimentWaiter } from './client';
|
|
5
|
-
export { ForecastingExperiment_State } from './model';
|
|
6
|
-
export type { CreateForecastingExperimentRequest, CreateForecastingExperimentResponse, ForecastingExperiment, GetForecastingExperimentRequest, } from './model';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { CreateForecastingExperimentRequest, CreateForecastingExperimentResponse, ForecastingExperiment, ForecastingExperiment_State, GetForecastingExperimentRequest } from "./model.js";
|
|
2
|
+
import { CreateForecastingExperimentWaiter, ForecastingClient } from "./client.js";
|
|
3
|
+
export { type CreateForecastingExperimentRequest, type CreateForecastingExperimentResponse, CreateForecastingExperimentWaiter, ForecastingClient, type ForecastingExperiment, ForecastingExperiment_State, type GetForecastingExperimentRequest };
|
package/dist/v1/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { ForecastingClient, CreateForecastingExperimentWaiter } from './client';
|
|
6
|
-
export { ForecastingExperiment_State } from './model';
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { ForecastingExperiment_State } from "./model.js";
|
|
2
|
+
import { CreateForecastingExperimentWaiter, ForecastingClient } from "./client.js";
|
|
3
|
+
|
|
4
|
+
export { CreateForecastingExperimentWaiter, ForecastingClient, ForecastingExperiment_State };
|
package/dist/v1/model.d.ts
CHANGED
|
@@ -1,81 +1,80 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly FAILED: "FAILED";
|
|
11
|
-
/** The forecasting experiment has been cancelled. */
|
|
12
|
-
readonly CANCELLED: "CANCELLED";
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/v1/model.d.ts
|
|
4
|
+
declare const ForecastingExperiment_State: {
|
|
5
|
+
/** The forecasting experiment is pending and has not started yet. */readonly PENDING: "PENDING"; /** The forecasting experiment is currently running. */
|
|
6
|
+
readonly RUNNING: "RUNNING"; /** The forecasting experiment has completed successfully. */
|
|
7
|
+
readonly SUCCEEDED: "SUCCEEDED"; /** The forecasting experiment has failed. */
|
|
8
|
+
readonly FAILED: "FAILED"; /** The forecasting experiment has been cancelled. */
|
|
9
|
+
readonly CANCELLED: "CANCELLED";
|
|
13
10
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
11
|
+
type ForecastingExperiment_State = (typeof ForecastingExperiment_State)[keyof typeof ForecastingExperiment_State] | (string & {});
|
|
12
|
+
interface CreateForecastingExperimentRequest {
|
|
13
|
+
/** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used as training data for the forecasting model. */
|
|
14
|
+
trainDataPath?: string | undefined;
|
|
15
|
+
/** The column in the input training table used as the prediction target for model training. The values in this column are used as the ground truth for model training. */
|
|
16
|
+
targetColumn?: string | undefined;
|
|
17
|
+
/** The column in the input training table that represents each row's timestamp. */
|
|
18
|
+
timeColumn?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The time interval between consecutive rows in the time series data.
|
|
21
|
+
* Possible values include: '1 second', '1 minute', '5 minutes', '10 minutes', '15 minutes', '30 minutes', 'Hourly', 'Daily', 'Weekly', 'Monthly', 'Quarterly', 'Yearly'.
|
|
22
|
+
*/
|
|
23
|
+
forecastGranularity?: string | undefined;
|
|
24
|
+
/** The number of time steps into the future to make predictions, calculated as a multiple of forecast_granularity. This value represents how far ahead the model should forecast. */
|
|
25
|
+
forecastHorizon?: bigint | undefined;
|
|
26
|
+
/** The evaluation metric used to optimize the forecasting model. */
|
|
27
|
+
primaryMetric?: string | undefined;
|
|
28
|
+
/** List of frameworks to include for model tuning. Possible values are 'Prophet', 'ARIMA', 'DeepAR'. An empty list includes all supported frameworks. */
|
|
29
|
+
trainingFrameworks?: string[] | undefined;
|
|
30
|
+
/** The path in the workspace to store the created experiment. */
|
|
31
|
+
experimentPath?: string | undefined;
|
|
32
|
+
/** The maximum duration for the experiment in minutes. The experiment stops automatically if it exceeds this limit. */
|
|
33
|
+
maxRuntime?: bigint | undefined;
|
|
34
|
+
/** // The column in the training table used for custom data splits. Values must be 'train', 'validate', or 'test'. */
|
|
35
|
+
splitColumn?: string | undefined;
|
|
36
|
+
/** The column in the training table used to customize weights for each time series. */
|
|
37
|
+
customWeightsColumn?: string | undefined;
|
|
38
|
+
/** The fully qualified path of a Unity Catalog model, formatted as catalog_name.schema_name.model_name, used to store the best model. */
|
|
39
|
+
registerTo?: string | undefined;
|
|
40
|
+
/** The region code(s) to automatically add holiday features. Currently supports only one region. */
|
|
41
|
+
holidayRegions?: string[] | undefined;
|
|
42
|
+
/** The column in the training table used to group the dataset for predicting individual time series. */
|
|
43
|
+
timeseriesIdentifierColumns?: string[] | undefined;
|
|
44
|
+
/** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used to store predictions. */
|
|
45
|
+
predictionDataPath?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Specifies the list of feature columns to include in model training. These columns must exist
|
|
48
|
+
* in the training data and be of type string, numerical, or boolean. If not specified, no additional
|
|
49
|
+
* features will be included.
|
|
50
|
+
* Note: Certain columns are automatically handled:
|
|
51
|
+
* - Automatically excluded: split_column, target_column, custom_weights_column.
|
|
52
|
+
* - Automatically included: time_column.
|
|
53
|
+
*/
|
|
54
|
+
includeFeatures?: string[] | undefined;
|
|
55
|
+
/** The fully qualified path of a Unity Catalog table, formatted as catalog_name.schema_name.table_name, used to store future feature data for predictions. */
|
|
56
|
+
futureFeatureDataPath?: string | undefined;
|
|
60
57
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
interface CreateForecastingExperimentResponse {
|
|
59
|
+
/** The unique ID of the created forecasting experiment */
|
|
60
|
+
experimentId?: string | undefined;
|
|
64
61
|
}
|
|
65
62
|
/** Represents a forecasting experiment with its unique identifier, URL, and state. */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
interface ForecastingExperiment {
|
|
64
|
+
/** The unique ID for the forecasting experiment. */
|
|
65
|
+
experimentId?: string | undefined;
|
|
66
|
+
/** The URL to the forecasting experiment page. */
|
|
67
|
+
experimentPageUrl?: string | undefined;
|
|
68
|
+
/** The current state of the forecasting experiment. */
|
|
69
|
+
state?: ForecastingExperiment_State | undefined;
|
|
73
70
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
interface GetForecastingExperimentRequest {
|
|
72
|
+
/** The unique ID of a forecasting experiment */
|
|
73
|
+
experimentId?: string | undefined;
|
|
77
74
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
declare const unmarshalCreateForecastingExperimentResponseSchema: z.ZodType<CreateForecastingExperimentResponse>;
|
|
76
|
+
declare const unmarshalForecastingExperimentSchema: z.ZodType<ForecastingExperiment>;
|
|
77
|
+
declare const marshalCreateForecastingExperimentRequestSchema: z.ZodType;
|
|
78
|
+
//#endregion
|
|
79
|
+
export { CreateForecastingExperimentRequest, CreateForecastingExperimentResponse, ForecastingExperiment, ForecastingExperiment_State, GetForecastingExperimentRequest, marshalCreateForecastingExperimentRequestSchema, unmarshalCreateForecastingExperimentResponseSchema, unmarshalForecastingExperimentSchema };
|
|
81
80
|
//# sourceMappingURL=model.d.ts.map
|
package/dist/v1/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","
|
|
1
|
+
{"version":3,"file":"model.d.ts","names":[],"sources":["../../src/v1/model.ts"],"mappings":";;;cAKa,2BAAA;oGAWH;EAAA,6BAAA;EAAA;;;;KAEE,2BAAA,WACA,2BAAA,eAA0C,2BAAA;AAAA,UAGrC,kCAAA;EAJsB;EAMrC,aAAA;EALU;EAOV,YAAA;EAJe;EAMf,UAAA;;;;;EAKA,mBAAA;EAAA;EAEA,eAAA;EAEA;EAAA,aAAA;EAIA;EAFA,kBAAA;EAMA;EAJA,cAAA;EAQA;EANA,UAAA;EAUA;EARA,WAAA;EAmBA;EAjBA,mBAAA;EAmBqB;EAjBrB,UAAA;EAoBe;EAlBf,cAAA;;EAEA,2BAAA;EAkBY;EAhBZ,kBAAA;EAoBoC;;;;;;;;EAXpC,eAAA;EAoBe;EAlBf,qBAAA;AAAA;AAAA,UAGe,mCAAA;EAiBH;EAfZ,YAAA;AAAA;;UAIe,qBAAA;EAcgD;EAZ/D,YAAA;EAYyE;EAVzE,iBAAA;EAU4G;EAR5G,KAAA,GAAQ,2BAAA;AAAA;AAAA,UAGO,+BAAA;EAc2C;EAZ1D,YAAA;AAAA;AAAA,cAGW,kDAAA,EAAoD,CAAA,CAAE,OAAA,CAAQ,mCAAA;AAAA,cAS9D,oCAAA,EAAsC,CAAA,CAAE,OAAA,CAAQ,qBAAA;AAAA,cAahD,+CAAA,EAAiD,CAAA,CAAE,OAAA"}
|