openlayer 0.7.0 → 0.8.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/CHANGELOG.md +43 -0
- package/README.md +50 -40
- package/_shims/node-runtime.d.ts.map +1 -1
- package/_shims/node-runtime.js +2 -3
- package/_shims/node-runtime.js.map +1 -1
- package/_shims/node-runtime.mjs +1 -1
- package/_shims/node-runtime.mjs.map +1 -1
- package/_shims/node-types.d.ts +1 -1
- package/core.d.ts +9 -6
- package/core.d.ts.map +1 -1
- package/core.js +31 -9
- package/core.js.map +1 -1
- package/core.mjs +28 -7
- package/core.mjs.map +1 -1
- package/error.d.ts +1 -1
- package/error.d.ts.map +1 -1
- package/error.js +1 -1
- package/error.js.map +1 -1
- package/error.mjs +1 -1
- package/error.mjs.map +1 -1
- package/index.d.mts +14 -17
- package/index.d.ts +14 -17
- package/index.d.ts.map +1 -1
- package/index.js +28 -11
- package/index.js.map +1 -1
- package/index.mjs +12 -10
- package/index.mjs.map +1 -1
- package/lib/core/openai-monitor.d.ts +3 -3
- package/lib/core/openai-monitor.d.ts.map +1 -1
- package/lib/core/openai-monitor.js.map +1 -1
- package/lib/core/openai-monitor.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/commits/commits.d.ts +2 -3
- package/resources/commits/commits.d.ts.map +1 -1
- package/resources/commits/commits.js +2 -3
- package/resources/commits/commits.js.map +1 -1
- package/resources/commits/commits.mjs +2 -3
- package/resources/commits/commits.mjs.map +1 -1
- package/resources/commits/index.d.ts +1 -1
- package/resources/commits/index.d.ts.map +1 -1
- package/resources/commits/index.js.map +1 -1
- package/resources/commits/index.mjs.map +1 -1
- package/resources/commits/test-results.d.ts +1 -22
- package/resources/commits/test-results.d.ts.map +1 -1
- package/resources/commits/test-results.js +0 -2
- package/resources/commits/test-results.js.map +1 -1
- package/resources/commits/test-results.mjs +0 -2
- package/resources/commits/test-results.mjs.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/inference-pipelines/data.d.ts +1 -3
- package/resources/inference-pipelines/data.d.ts.map +1 -1
- package/resources/inference-pipelines/data.js +0 -2
- package/resources/inference-pipelines/data.js.map +1 -1
- package/resources/inference-pipelines/data.mjs +0 -2
- package/resources/inference-pipelines/data.mjs.map +1 -1
- package/resources/inference-pipelines/index.d.ts +4 -4
- package/resources/inference-pipelines/index.d.ts.map +1 -1
- package/resources/inference-pipelines/index.js.map +1 -1
- package/resources/inference-pipelines/index.mjs.map +1 -1
- package/resources/inference-pipelines/inference-pipelines.d.ts +7 -13
- package/resources/inference-pipelines/inference-pipelines.d.ts.map +1 -1
- package/resources/inference-pipelines/inference-pipelines.js +6 -5
- package/resources/inference-pipelines/inference-pipelines.js.map +1 -1
- package/resources/inference-pipelines/inference-pipelines.mjs +6 -5
- package/resources/inference-pipelines/inference-pipelines.mjs.map +1 -1
- package/resources/inference-pipelines/rows.d.ts +1 -3
- package/resources/inference-pipelines/rows.d.ts.map +1 -1
- package/resources/inference-pipelines/rows.js +0 -2
- package/resources/inference-pipelines/rows.js.map +1 -1
- package/resources/inference-pipelines/rows.mjs +0 -2
- package/resources/inference-pipelines/rows.mjs.map +1 -1
- package/resources/inference-pipelines/test-results.d.ts +1 -22
- package/resources/inference-pipelines/test-results.d.ts.map +1 -1
- package/resources/inference-pipelines/test-results.js +0 -2
- package/resources/inference-pipelines/test-results.js.map +1 -1
- package/resources/inference-pipelines/test-results.mjs +0 -2
- package/resources/inference-pipelines/test-results.mjs.map +1 -1
- package/resources/projects/commits.d.ts +150 -16
- package/resources/projects/commits.d.ts.map +1 -1
- package/resources/projects/commits.js +6 -2
- package/resources/projects/commits.js.map +1 -1
- package/resources/projects/commits.mjs +6 -2
- package/resources/projects/commits.mjs.map +1 -1
- package/resources/projects/index.d.ts +3 -3
- package/resources/projects/index.d.ts.map +1 -1
- package/resources/projects/index.js.map +1 -1
- package/resources/projects/index.mjs +1 -1
- package/resources/projects/index.mjs.map +1 -1
- package/resources/projects/inference-pipelines.d.ts +1 -24
- package/resources/projects/inference-pipelines.d.ts.map +1 -1
- package/resources/projects/inference-pipelines.js +0 -2
- package/resources/projects/inference-pipelines.js.map +1 -1
- package/resources/projects/inference-pipelines.mjs +0 -2
- package/resources/projects/inference-pipelines.mjs.map +1 -1
- package/resources/projects/projects.d.ts +5 -32
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/projects/projects.js +4 -4
- package/resources/projects/projects.js.map +1 -1
- package/resources/projects/projects.mjs +4 -4
- package/resources/projects/projects.mjs.map +1 -1
- package/resources/storage/index.d.ts +1 -1
- package/resources/storage/index.d.ts.map +1 -1
- package/resources/storage/index.js.map +1 -1
- package/resources/storage/index.mjs +1 -1
- package/resources/storage/index.mjs.map +1 -1
- package/resources/storage/presigned-url.d.ts +2 -4
- package/resources/storage/presigned-url.d.ts.map +1 -1
- package/resources/storage/presigned-url.js +0 -2
- package/resources/storage/presigned-url.js.map +1 -1
- package/resources/storage/presigned-url.mjs +0 -2
- package/resources/storage/presigned-url.mjs.map +1 -1
- package/resources/storage/storage.d.ts +2 -3
- package/resources/storage/storage.d.ts.map +1 -1
- package/resources/storage/storage.js +2 -3
- package/resources/storage/storage.js.map +1 -1
- package/resources/storage/storage.mjs +2 -3
- package/resources/storage/storage.mjs.map +1 -1
- package/shims/node.d.ts +1 -0
- package/shims/node.d.ts.map +1 -1
- package/src/_shims/node-runtime.ts +1 -3
- package/src/_shims/node-types.d.ts +1 -1
- package/src/core.ts +44 -13
- package/src/error.ts +3 -3
- package/src/index.ts +48 -26
- package/src/lib/core/openai-monitor.ts +3 -3
- package/src/lib/integrations/openAiTracer.ts +1 -1
- package/src/resources/commits/commits.ts +9 -4
- package/src/resources/commits/index.ts +1 -1
- package/src/resources/commits/test-results.ts +5 -28
- package/src/resources/index.ts +7 -7
- package/src/resources/inference-pipelines/data.ts +2 -4
- package/src/resources/inference-pipelines/index.ts +6 -6
- package/src/resources/inference-pipelines/inference-pipelines.ts +31 -14
- package/src/resources/inference-pipelines/rows.ts +2 -4
- package/src/resources/inference-pipelines/test-results.ts +5 -28
- package/src/resources/projects/commits.ts +192 -17
- package/src/resources/projects/index.ts +15 -9
- package/src/resources/projects/inference-pipelines.ts +7 -30
- package/src/resources/projects/projects.ts +40 -38
- package/src/resources/storage/index.ts +5 -1
- package/src/resources/storage/presigned-url.ts +6 -5
- package/src/resources/storage/storage.ts +9 -4
- package/src/uploads.ts +11 -4
- package/src/version.ts +1 -1
- package/uploads.d.ts.map +1 -1
- package/uploads.js +10 -4
- package/uploads.js.map +1 -1
- package/uploads.mjs +10 -4
- package/uploads.mjs.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/index.ts
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Errors from './error';
|
|
4
|
-
import * as Uploads from './uploads';
|
|
5
3
|
import { type Agent } from './_shims/index';
|
|
6
4
|
import * as Core from './core';
|
|
5
|
+
import * as Errors from './error';
|
|
6
|
+
import * as Uploads from './uploads';
|
|
7
7
|
import * as API from './resources/index';
|
|
8
|
+
import { Commits } from './resources/commits/commits';
|
|
9
|
+
import {
|
|
10
|
+
InferencePipelineRetrieveResponse,
|
|
11
|
+
InferencePipelineUpdateParams,
|
|
12
|
+
InferencePipelineUpdateResponse,
|
|
13
|
+
InferencePipelines,
|
|
14
|
+
} from './resources/inference-pipelines/inference-pipelines';
|
|
15
|
+
import {
|
|
16
|
+
ProjectCreateParams,
|
|
17
|
+
ProjectCreateResponse,
|
|
18
|
+
ProjectListParams,
|
|
19
|
+
ProjectListResponse,
|
|
20
|
+
Projects,
|
|
21
|
+
} from './resources/projects/projects';
|
|
22
|
+
import { Storage } from './resources/storage/storage';
|
|
8
23
|
|
|
9
24
|
export interface ClientOptions {
|
|
10
25
|
/**
|
|
@@ -150,6 +165,7 @@ export class Openlayer extends Core.APIClient {
|
|
|
150
165
|
}
|
|
151
166
|
|
|
152
167
|
static Openlayer = this;
|
|
168
|
+
static DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
153
169
|
|
|
154
170
|
static OpenlayerError = Errors.OpenlayerError;
|
|
155
171
|
static APIError = Errors.APIError;
|
|
@@ -169,7 +185,35 @@ export class Openlayer extends Core.APIClient {
|
|
|
169
185
|
static fileFromPath = Uploads.fileFromPath;
|
|
170
186
|
}
|
|
171
187
|
|
|
172
|
-
|
|
188
|
+
Openlayer.Projects = Projects;
|
|
189
|
+
Openlayer.Commits = Commits;
|
|
190
|
+
Openlayer.InferencePipelines = InferencePipelines;
|
|
191
|
+
Openlayer.Storage = Storage;
|
|
192
|
+
export declare namespace Openlayer {
|
|
193
|
+
export type RequestOptions = Core.RequestOptions;
|
|
194
|
+
|
|
195
|
+
export {
|
|
196
|
+
Projects as Projects,
|
|
197
|
+
type ProjectCreateResponse as ProjectCreateResponse,
|
|
198
|
+
type ProjectListResponse as ProjectListResponse,
|
|
199
|
+
type ProjectCreateParams as ProjectCreateParams,
|
|
200
|
+
type ProjectListParams as ProjectListParams,
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export { Commits as Commits };
|
|
204
|
+
|
|
205
|
+
export {
|
|
206
|
+
InferencePipelines as InferencePipelines,
|
|
207
|
+
type InferencePipelineRetrieveResponse as InferencePipelineRetrieveResponse,
|
|
208
|
+
type InferencePipelineUpdateResponse as InferencePipelineUpdateResponse,
|
|
209
|
+
type InferencePipelineUpdateParams as InferencePipelineUpdateParams,
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export { Storage as Storage };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export { toFile, fileFromPath } from './uploads';
|
|
216
|
+
export {
|
|
173
217
|
OpenlayerError,
|
|
174
218
|
APIError,
|
|
175
219
|
APIConnectionError,
|
|
@@ -183,28 +227,6 @@ export const {
|
|
|
183
227
|
InternalServerError,
|
|
184
228
|
PermissionDeniedError,
|
|
185
229
|
UnprocessableEntityError,
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export import toFile = Uploads.toFile;
|
|
189
|
-
export import fileFromPath = Uploads.fileFromPath;
|
|
190
|
-
|
|
191
|
-
export namespace Openlayer {
|
|
192
|
-
export import RequestOptions = Core.RequestOptions;
|
|
193
|
-
|
|
194
|
-
export import Projects = API.Projects;
|
|
195
|
-
export import ProjectCreateResponse = API.ProjectCreateResponse;
|
|
196
|
-
export import ProjectListResponse = API.ProjectListResponse;
|
|
197
|
-
export import ProjectCreateParams = API.ProjectCreateParams;
|
|
198
|
-
export import ProjectListParams = API.ProjectListParams;
|
|
199
|
-
|
|
200
|
-
export import Commits = API.Commits;
|
|
201
|
-
|
|
202
|
-
export import InferencePipelines = API.InferencePipelines;
|
|
203
|
-
export import InferencePipelineRetrieveResponse = API.InferencePipelineRetrieveResponse;
|
|
204
|
-
export import InferencePipelineUpdateResponse = API.InferencePipelineUpdateResponse;
|
|
205
|
-
export import InferencePipelineUpdateParams = API.InferencePipelineUpdateParams;
|
|
206
|
-
|
|
207
|
-
export import Storage = API.Storage;
|
|
208
|
-
}
|
|
230
|
+
} from './error';
|
|
209
231
|
|
|
210
232
|
export default Openlayer;
|
|
@@ -213,7 +213,7 @@ class OpenAIMonitor {
|
|
|
213
213
|
public createChatCompletion = async (
|
|
214
214
|
body: ChatCompletionCreateParams,
|
|
215
215
|
options?: RequestOptions,
|
|
216
|
-
additionalLogs?: Openlayer.RequestOptions
|
|
216
|
+
additionalLogs?: Openlayer.RequestOptions | undefined,
|
|
217
217
|
): Promise<ChatCompletion | Stream<ChatCompletionChunk>> => {
|
|
218
218
|
// Start a timer to measure latency
|
|
219
219
|
const startTime = Date.now();
|
|
@@ -309,7 +309,7 @@ class OpenAIMonitor {
|
|
|
309
309
|
public createCompletion = async (
|
|
310
310
|
body: CompletionCreateParams,
|
|
311
311
|
options?: RequestOptions,
|
|
312
|
-
additionalLogs?: Openlayer.RequestOptions
|
|
312
|
+
additionalLogs?: Openlayer.RequestOptions | undefined,
|
|
313
313
|
): Promise<Completion | Stream<Completion>> => {
|
|
314
314
|
if (!body.prompt) {
|
|
315
315
|
console.error('No prompt provided.');
|
|
@@ -407,7 +407,7 @@ class OpenAIMonitor {
|
|
|
407
407
|
* @param {Openlayer.RequestOptions<any> | undefined} [additionalLogs] - Optional metadata logs to include with the request sent to Openlayer.
|
|
408
408
|
* @returns {Promise<void>} A promise that resolves when the run data has been successfully published to Openlayer.
|
|
409
409
|
*/
|
|
410
|
-
public async monitorThreadRun(run: Run, additionalLogs?: Openlayer.RequestOptions
|
|
410
|
+
public async monitorThreadRun(run: Run, additionalLogs?: Openlayer.RequestOptions | undefined) {
|
|
411
411
|
if (run.status !== 'completed' || this.openlayerInferencePipelineId.length === 0) {
|
|
412
412
|
return;
|
|
413
413
|
}
|
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as TestResultsAPI from './test-results';
|
|
5
|
+
import { TestResultListParams, TestResultListResponse, TestResults } from './test-results';
|
|
5
6
|
|
|
6
7
|
export class Commits extends APIResource {
|
|
7
8
|
testResults: TestResultsAPI.TestResults = new TestResultsAPI.TestResults(this._client);
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
11
|
+
Commits.TestResults = TestResults;
|
|
12
|
+
|
|
13
|
+
export declare namespace Commits {
|
|
14
|
+
export {
|
|
15
|
+
TestResults as TestResults,
|
|
16
|
+
type TestResultListResponse as TestResultListResponse,
|
|
17
|
+
type TestResultListParams as TestResultListParams,
|
|
18
|
+
};
|
|
14
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export { Commits } from './commits';
|
|
4
|
-
export { TestResultListResponse, TestResultListParams
|
|
4
|
+
export { TestResults, type TestResultListResponse, type TestResultListParams } from './test-results';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as TestResultsAPI from './test-results';
|
|
7
6
|
|
|
8
7
|
export class TestResults extends APIResource {
|
|
9
8
|
/**
|
|
@@ -28,34 +27,10 @@ export class TestResults extends APIResource {
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
export interface TestResultListResponse {
|
|
31
|
-
_meta: TestResultListResponse._Meta;
|
|
32
|
-
|
|
33
30
|
items: Array<TestResultListResponse.Item>;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
export namespace TestResultListResponse {
|
|
37
|
-
export interface _Meta {
|
|
38
|
-
/**
|
|
39
|
-
* The current page.
|
|
40
|
-
*/
|
|
41
|
-
page: number;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* The number of items per page.
|
|
45
|
-
*/
|
|
46
|
-
perPage: number;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The total number of items.
|
|
50
|
-
*/
|
|
51
|
-
totalItems: number;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* The total number of pages.
|
|
55
|
-
*/
|
|
56
|
-
totalPages: number;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
34
|
export interface Item {
|
|
60
35
|
/**
|
|
61
36
|
* Project version (commit) id.
|
|
@@ -278,7 +253,9 @@ export interface TestResultListParams {
|
|
|
278
253
|
type?: 'integrity' | 'consistency' | 'performance' | 'fairness' | 'robustness';
|
|
279
254
|
}
|
|
280
255
|
|
|
281
|
-
export namespace TestResults {
|
|
282
|
-
export
|
|
283
|
-
|
|
256
|
+
export declare namespace TestResults {
|
|
257
|
+
export {
|
|
258
|
+
type TestResultListResponse as TestResultListResponse,
|
|
259
|
+
type TestResultListParams as TestResultListParams,
|
|
260
|
+
};
|
|
284
261
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
export { Commits } from './commits/commits';
|
|
4
4
|
export {
|
|
5
|
-
InferencePipelineRetrieveResponse,
|
|
6
|
-
InferencePipelineUpdateResponse,
|
|
7
|
-
InferencePipelineUpdateParams,
|
|
8
5
|
InferencePipelines,
|
|
6
|
+
type InferencePipelineRetrieveResponse,
|
|
7
|
+
type InferencePipelineUpdateResponse,
|
|
8
|
+
type InferencePipelineUpdateParams,
|
|
9
9
|
} from './inference-pipelines/inference-pipelines';
|
|
10
10
|
export {
|
|
11
|
-
ProjectCreateResponse,
|
|
12
|
-
ProjectListResponse,
|
|
13
|
-
ProjectCreateParams,
|
|
14
|
-
ProjectListParams,
|
|
15
11
|
Projects,
|
|
12
|
+
type ProjectCreateResponse,
|
|
13
|
+
type ProjectListResponse,
|
|
14
|
+
type ProjectCreateParams,
|
|
15
|
+
type ProjectListParams,
|
|
16
16
|
} from './projects/projects';
|
|
17
17
|
export { Storage } from './storage/storage';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import * as DataAPI from './data';
|
|
6
5
|
|
|
7
6
|
export class Data extends APIResource {
|
|
8
7
|
/**
|
|
@@ -279,7 +278,6 @@ export namespace DataStreamParams {
|
|
|
279
278
|
}
|
|
280
279
|
}
|
|
281
280
|
|
|
282
|
-
export namespace Data {
|
|
283
|
-
export
|
|
284
|
-
export import DataStreamParams = DataAPI.DataStreamParams;
|
|
281
|
+
export declare namespace Data {
|
|
282
|
+
export { type DataStreamResponse as DataStreamResponse, type DataStreamParams as DataStreamParams };
|
|
285
283
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { DataStreamResponse, DataStreamParams
|
|
3
|
+
export { Data, type DataStreamResponse, type DataStreamParams } from './data';
|
|
4
4
|
export {
|
|
5
|
-
InferencePipelineRetrieveResponse,
|
|
6
|
-
InferencePipelineUpdateResponse,
|
|
7
|
-
InferencePipelineUpdateParams,
|
|
8
5
|
InferencePipelines,
|
|
6
|
+
type InferencePipelineRetrieveResponse,
|
|
7
|
+
type InferencePipelineUpdateResponse,
|
|
8
|
+
type InferencePipelineUpdateParams,
|
|
9
9
|
} from './inference-pipelines';
|
|
10
|
-
export { RowUpdateResponse, RowUpdateParams
|
|
11
|
-
export { TestResultListResponse, TestResultListParams
|
|
10
|
+
export { Rows, type RowUpdateResponse, type RowUpdateParams } from './rows';
|
|
11
|
+
export { TestResults, type TestResultListResponse, type TestResultListParams } from './test-results';
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as InferencePipelinesAPI from './inference-pipelines';
|
|
7
6
|
import * as DataAPI from './data';
|
|
7
|
+
import { Data, DataStreamParams, DataStreamResponse } from './data';
|
|
8
8
|
import * as RowsAPI from './rows';
|
|
9
|
+
import { RowUpdateParams, RowUpdateResponse, Rows } from './rows';
|
|
9
10
|
import * as TestResultsAPI from './test-results';
|
|
11
|
+
import { TestResultListParams, TestResultListResponse, TestResults } from './test-results';
|
|
10
12
|
|
|
11
13
|
export class InferencePipelines extends APIResource {
|
|
12
14
|
data: DataAPI.Data = new DataAPI.Data(this._client);
|
|
@@ -235,17 +237,32 @@ export interface InferencePipelineUpdateParams {
|
|
|
235
237
|
referenceDatasetUri?: string | null;
|
|
236
238
|
}
|
|
237
239
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
export
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
export
|
|
250
|
-
|
|
240
|
+
InferencePipelines.Data = Data;
|
|
241
|
+
InferencePipelines.Rows = Rows;
|
|
242
|
+
InferencePipelines.TestResults = TestResults;
|
|
243
|
+
|
|
244
|
+
export declare namespace InferencePipelines {
|
|
245
|
+
export {
|
|
246
|
+
type InferencePipelineRetrieveResponse as InferencePipelineRetrieveResponse,
|
|
247
|
+
type InferencePipelineUpdateResponse as InferencePipelineUpdateResponse,
|
|
248
|
+
type InferencePipelineUpdateParams as InferencePipelineUpdateParams,
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export {
|
|
252
|
+
Data as Data,
|
|
253
|
+
type DataStreamResponse as DataStreamResponse,
|
|
254
|
+
type DataStreamParams as DataStreamParams,
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export {
|
|
258
|
+
Rows as Rows,
|
|
259
|
+
type RowUpdateResponse as RowUpdateResponse,
|
|
260
|
+
type RowUpdateParams as RowUpdateParams,
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export {
|
|
264
|
+
TestResults as TestResults,
|
|
265
|
+
type TestResultListResponse as TestResultListResponse,
|
|
266
|
+
type TestResultListParams as TestResultListParams,
|
|
267
|
+
};
|
|
251
268
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import * as RowsAPI from './rows';
|
|
6
5
|
|
|
7
6
|
export class Rows extends APIResource {
|
|
8
7
|
/**
|
|
@@ -75,7 +74,6 @@ export namespace RowUpdateParams {
|
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
export namespace Rows {
|
|
79
|
-
export
|
|
80
|
-
export import RowUpdateParams = RowsAPI.RowUpdateParams;
|
|
77
|
+
export declare namespace Rows {
|
|
78
|
+
export { type RowUpdateResponse as RowUpdateResponse, type RowUpdateParams as RowUpdateParams };
|
|
81
79
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as TestResultsAPI from './test-results';
|
|
7
6
|
|
|
8
7
|
export class TestResults extends APIResource {
|
|
9
8
|
/**
|
|
@@ -28,34 +27,10 @@ export class TestResults extends APIResource {
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
export interface TestResultListResponse {
|
|
31
|
-
_meta: TestResultListResponse._Meta;
|
|
32
|
-
|
|
33
30
|
items: Array<TestResultListResponse.Item>;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
export namespace TestResultListResponse {
|
|
37
|
-
export interface _Meta {
|
|
38
|
-
/**
|
|
39
|
-
* The current page.
|
|
40
|
-
*/
|
|
41
|
-
page: number;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* The number of items per page.
|
|
45
|
-
*/
|
|
46
|
-
perPage: number;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The total number of items.
|
|
50
|
-
*/
|
|
51
|
-
totalItems: number;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* The total number of pages.
|
|
55
|
-
*/
|
|
56
|
-
totalPages: number;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
34
|
export interface Item {
|
|
60
35
|
/**
|
|
61
36
|
* Project version (commit) id.
|
|
@@ -273,7 +248,9 @@ export interface TestResultListParams {
|
|
|
273
248
|
type?: 'integrity' | 'consistency' | 'performance' | 'fairness' | 'robustness';
|
|
274
249
|
}
|
|
275
250
|
|
|
276
|
-
export namespace TestResults {
|
|
277
|
-
export
|
|
278
|
-
|
|
251
|
+
export declare namespace TestResults {
|
|
252
|
+
export {
|
|
253
|
+
type TestResultListResponse as TestResultListResponse,
|
|
254
|
+
type TestResultListParams as TestResultListParams,
|
|
255
|
+
};
|
|
279
256
|
}
|
|
@@ -3,9 +3,19 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as CommitsAPI from './commits';
|
|
7
6
|
|
|
8
7
|
export class Commits extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a new commit (project version) in a project.
|
|
10
|
+
*/
|
|
11
|
+
create(
|
|
12
|
+
projectId: string,
|
|
13
|
+
body: CommitCreateParams,
|
|
14
|
+
options?: Core.RequestOptions,
|
|
15
|
+
): Core.APIPromise<CommitCreateResponse> {
|
|
16
|
+
return this._client.post(`/projects/${projectId}/versions`, { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
/**
|
|
10
20
|
* List the commits (project versions) in a project.
|
|
11
21
|
*/
|
|
@@ -27,35 +37,162 @@ export class Commits extends APIResource {
|
|
|
27
37
|
}
|
|
28
38
|
}
|
|
29
39
|
|
|
30
|
-
export interface
|
|
31
|
-
|
|
40
|
+
export interface CommitCreateResponse {
|
|
41
|
+
/**
|
|
42
|
+
* The project version (commit) id.
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The details of a commit (project version).
|
|
48
|
+
*/
|
|
49
|
+
commit: CommitCreateResponse.Commit;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The commit archive date.
|
|
53
|
+
*/
|
|
54
|
+
dateArchived: string | null;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The project version (commit) creation date.
|
|
58
|
+
*/
|
|
59
|
+
dateCreated: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The number of tests that are failing for the commit.
|
|
63
|
+
*/
|
|
64
|
+
failingGoalCount: number;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The model id.
|
|
68
|
+
*/
|
|
69
|
+
mlModelId: string | null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The number of tests that are passing for the commit.
|
|
73
|
+
*/
|
|
74
|
+
passingGoalCount: number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The project id.
|
|
78
|
+
*/
|
|
79
|
+
projectId: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The commit status. Initially, the commit is `queued`, then, it switches to
|
|
83
|
+
* `running`. Finally, it can be `paused`, `failed`, or `completed`.
|
|
84
|
+
*/
|
|
85
|
+
status: 'queued' | 'running' | 'paused' | 'failed' | 'completed' | 'unknown';
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The commit status message.
|
|
89
|
+
*/
|
|
90
|
+
statusMessage: string | null;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The total number of tests for the commit.
|
|
94
|
+
*/
|
|
95
|
+
totalGoalCount: number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The training dataset id.
|
|
99
|
+
*/
|
|
100
|
+
trainingDatasetId: string | null;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The validation dataset id.
|
|
104
|
+
*/
|
|
105
|
+
validationDatasetId: string | null;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Whether the commit is archived.
|
|
109
|
+
*/
|
|
110
|
+
archived?: boolean | null;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The deployment status associated with the commit's model.
|
|
114
|
+
*/
|
|
115
|
+
deploymentStatus?: string;
|
|
116
|
+
|
|
117
|
+
links?: CommitCreateResponse.Links;
|
|
34
118
|
}
|
|
35
119
|
|
|
36
|
-
export namespace
|
|
37
|
-
|
|
120
|
+
export namespace CommitCreateResponse {
|
|
121
|
+
/**
|
|
122
|
+
* The details of a commit (project version).
|
|
123
|
+
*/
|
|
124
|
+
export interface Commit {
|
|
125
|
+
/**
|
|
126
|
+
* The commit id.
|
|
127
|
+
*/
|
|
128
|
+
id: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The author id of the commit.
|
|
132
|
+
*/
|
|
133
|
+
authorId: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The size of the commit bundle in bytes.
|
|
137
|
+
*/
|
|
138
|
+
fileSize: number | null;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The commit message.
|
|
142
|
+
*/
|
|
143
|
+
message: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* The model id.
|
|
147
|
+
*/
|
|
148
|
+
mlModelId: string | null;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The storage URI where the commit bundle is stored.
|
|
152
|
+
*/
|
|
153
|
+
storageUri: string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The training dataset id.
|
|
157
|
+
*/
|
|
158
|
+
trainingDatasetId: string | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The validation dataset id.
|
|
162
|
+
*/
|
|
163
|
+
validationDatasetId: string | null;
|
|
164
|
+
|
|
38
165
|
/**
|
|
39
|
-
* The
|
|
166
|
+
* The commit creation date.
|
|
40
167
|
*/
|
|
41
|
-
|
|
168
|
+
dateCreated?: string;
|
|
42
169
|
|
|
43
170
|
/**
|
|
44
|
-
* The
|
|
171
|
+
* The ref of the corresponding git commit.
|
|
45
172
|
*/
|
|
46
|
-
|
|
173
|
+
gitCommitRef?: string;
|
|
47
174
|
|
|
48
175
|
/**
|
|
49
|
-
* The
|
|
176
|
+
* The SHA of the corresponding git commit.
|
|
50
177
|
*/
|
|
51
|
-
|
|
178
|
+
gitCommitSha?: number;
|
|
52
179
|
|
|
53
180
|
/**
|
|
54
|
-
* The
|
|
181
|
+
* The URL of the corresponding git commit.
|
|
55
182
|
*/
|
|
56
|
-
|
|
183
|
+
gitCommitUrl?: string;
|
|
57
184
|
}
|
|
58
185
|
|
|
186
|
+
export interface Links {
|
|
187
|
+
app: string;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface CommitListResponse {
|
|
192
|
+
items: Array<CommitListResponse.Item>;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export namespace CommitListResponse {
|
|
59
196
|
export interface Item {
|
|
60
197
|
/**
|
|
61
198
|
* The project version (commit) id.
|
|
@@ -208,6 +345,40 @@ export namespace CommitListResponse {
|
|
|
208
345
|
}
|
|
209
346
|
}
|
|
210
347
|
|
|
348
|
+
export interface CommitCreateParams {
|
|
349
|
+
/**
|
|
350
|
+
* The details of a commit (project version).
|
|
351
|
+
*/
|
|
352
|
+
commit: CommitCreateParams.Commit;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* The storage URI where the commit bundle is stored.
|
|
356
|
+
*/
|
|
357
|
+
storageUri: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Whether the commit is archived.
|
|
361
|
+
*/
|
|
362
|
+
archived?: boolean | null;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* The deployment status associated with the commit's model.
|
|
366
|
+
*/
|
|
367
|
+
deploymentStatus?: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export namespace CommitCreateParams {
|
|
371
|
+
/**
|
|
372
|
+
* The details of a commit (project version).
|
|
373
|
+
*/
|
|
374
|
+
export interface Commit {
|
|
375
|
+
/**
|
|
376
|
+
* The commit message.
|
|
377
|
+
*/
|
|
378
|
+
message: string;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
211
382
|
export interface CommitListParams {
|
|
212
383
|
/**
|
|
213
384
|
* The page to return in a paginated query.
|
|
@@ -220,7 +391,11 @@ export interface CommitListParams {
|
|
|
220
391
|
perPage?: number;
|
|
221
392
|
}
|
|
222
393
|
|
|
223
|
-
export namespace Commits {
|
|
224
|
-
export
|
|
225
|
-
|
|
394
|
+
export declare namespace Commits {
|
|
395
|
+
export {
|
|
396
|
+
type CommitCreateResponse as CommitCreateResponse,
|
|
397
|
+
type CommitListResponse as CommitListResponse,
|
|
398
|
+
type CommitCreateParams as CommitCreateParams,
|
|
399
|
+
type CommitListParams as CommitListParams,
|
|
400
|
+
};
|
|
226
401
|
}
|