@gpuai/sdk 0.5.3 → 0.5.5
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/.openapi-generator/FILES +56 -0
- package/README.md +50 -2
- package/dist/apis/BillingApi.d.ts +2 -2
- package/dist/apis/BillingApi.js +2 -2
- package/dist/apis/EndpointsApi.d.ts +150 -0
- package/dist/apis/EndpointsApi.js +379 -0
- package/dist/apis/InstancesApi.d.ts +15 -0
- package/dist/apis/InstancesApi.js +45 -0
- package/dist/apis/JobsApi.d.ts +172 -0
- package/dist/apis/JobsApi.js +444 -0
- package/dist/apis/OperationsApi.d.ts +17 -0
- package/dist/apis/OperationsApi.js +48 -0
- package/dist/apis/SecretsApi.d.ts +123 -0
- package/dist/apis/SecretsApi.js +328 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/BillingApi.d.ts +2 -2
- package/dist/esm/apis/BillingApi.js +2 -2
- package/dist/esm/apis/EndpointsApi.d.ts +150 -0
- package/dist/esm/apis/EndpointsApi.js +375 -0
- package/dist/esm/apis/InstancesApi.d.ts +15 -0
- package/dist/esm/apis/InstancesApi.js +45 -0
- package/dist/esm/apis/JobsApi.d.ts +172 -0
- package/dist/esm/apis/JobsApi.js +440 -0
- package/dist/esm/apis/OperationsApi.d.ts +17 -0
- package/dist/esm/apis/OperationsApi.js +48 -0
- package/dist/esm/apis/SecretsApi.d.ts +123 -0
- package/dist/esm/apis/SecretsApi.js +324 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/Balance.d.ts +6 -0
- package/dist/esm/models/Balance.js +2 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/esm/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/esm/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/esm/models/DedicatedIPOffer.js +87 -0
- package/dist/esm/models/Endpoint.d.ts +147 -0
- package/dist/esm/models/Endpoint.js +121 -0
- package/dist/esm/models/EndpointCreate.d.ts +80 -0
- package/dist/esm/models/EndpointCreate.js +63 -0
- package/dist/esm/models/EndpointList.d.ts +33 -0
- package/dist/esm/models/EndpointList.js +44 -0
- package/dist/esm/models/EndpointMachine.d.ts +90 -0
- package/dist/esm/models/EndpointMachine.js +84 -0
- package/dist/esm/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/esm/models/EndpointReplicaCounts.js +47 -0
- package/dist/esm/models/Job.d.ts +352 -0
- package/dist/esm/models/Job.js +254 -0
- package/dist/esm/models/JobAttempt.d.ts +176 -0
- package/dist/esm/models/JobAttempt.js +147 -0
- package/dist/esm/models/JobCreate.d.ts +153 -0
- package/dist/esm/models/JobCreate.js +84 -0
- package/dist/esm/models/JobGpuTypes.d.ts +39 -0
- package/dist/esm/models/JobGpuTypes.js +48 -0
- package/dist/esm/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/esm/models/JobGpuTypesDataInner.js +59 -0
- package/dist/esm/models/JobLogChunk.d.ts +50 -0
- package/dist/esm/models/JobLogChunk.js +55 -0
- package/dist/esm/models/JobLogs.d.ts +39 -0
- package/dist/esm/models/JobLogs.js +48 -0
- package/dist/esm/models/JobPage.d.ts +39 -0
- package/dist/esm/models/JobPage.js +48 -0
- package/dist/esm/models/JobSharingHint.d.ts +46 -0
- package/dist/esm/models/JobSharingHint.js +51 -0
- package/dist/esm/models/JobTelemetry.d.ts +51 -0
- package/dist/esm/models/JobTelemetry.js +56 -0
- package/dist/esm/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/esm/models/JobTelemetryPoint.js +59 -0
- package/dist/esm/models/JobTrial.d.ts +79 -0
- package/dist/esm/models/JobTrial.js +73 -0
- package/dist/esm/models/Secret.d.ts +62 -0
- package/dist/esm/models/Secret.js +63 -0
- package/dist/esm/models/SecretCreate.d.ts +44 -0
- package/dist/esm/models/SecretCreate.js +49 -0
- package/dist/esm/models/SecretImportItem.d.ts +38 -0
- package/dist/esm/models/SecretImportItem.js +47 -0
- package/dist/esm/models/SecretImportRequest.d.ts +39 -0
- package/dist/esm/models/SecretImportRequest.js +46 -0
- package/dist/esm/models/SecretImportResult.d.ts +44 -0
- package/dist/esm/models/SecretImportResult.js +51 -0
- package/dist/esm/models/SecretList.d.ts +33 -0
- package/dist/esm/models/SecretList.js +44 -0
- package/dist/esm/models/SecretPut.d.ts +38 -0
- package/dist/esm/models/SecretPut.js +45 -0
- package/dist/esm/models/WebhookEndpoint.d.ts +3 -0
- package/dist/esm/models/WebhookEndpoint.js +4 -1
- package/dist/esm/models/index.d.ts +25 -0
- package/dist/esm/models/index.js +25 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/Balance.d.ts +6 -0
- package/dist/models/Balance.js +2 -0
- package/dist/models/CreateWebhookEndpointRequest.d.ts +3 -0
- package/dist/models/CreateWebhookEndpointRequest.js +4 -1
- package/dist/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/models/DedicatedIPOffer.js +94 -0
- package/dist/models/Endpoint.d.ts +147 -0
- package/dist/models/Endpoint.js +129 -0
- package/dist/models/EndpointCreate.d.ts +80 -0
- package/dist/models/EndpointCreate.js +70 -0
- package/dist/models/EndpointList.d.ts +33 -0
- package/dist/models/EndpointList.js +51 -0
- package/dist/models/EndpointMachine.d.ts +90 -0
- package/dist/models/EndpointMachine.js +92 -0
- package/dist/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/models/EndpointReplicaCounts.js +54 -0
- package/dist/models/Job.d.ts +352 -0
- package/dist/models/Job.js +262 -0
- package/dist/models/JobAttempt.d.ts +176 -0
- package/dist/models/JobAttempt.js +155 -0
- package/dist/models/JobCreate.d.ts +153 -0
- package/dist/models/JobCreate.js +92 -0
- package/dist/models/JobGpuTypes.d.ts +39 -0
- package/dist/models/JobGpuTypes.js +55 -0
- package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/models/JobGpuTypesDataInner.js +66 -0
- package/dist/models/JobLogChunk.d.ts +50 -0
- package/dist/models/JobLogChunk.js +62 -0
- package/dist/models/JobLogs.d.ts +39 -0
- package/dist/models/JobLogs.js +55 -0
- package/dist/models/JobPage.d.ts +39 -0
- package/dist/models/JobPage.js +55 -0
- package/dist/models/JobSharingHint.d.ts +46 -0
- package/dist/models/JobSharingHint.js +58 -0
- package/dist/models/JobTelemetry.d.ts +51 -0
- package/dist/models/JobTelemetry.js +63 -0
- package/dist/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/models/JobTelemetryPoint.js +66 -0
- package/dist/models/JobTrial.d.ts +79 -0
- package/dist/models/JobTrial.js +81 -0
- package/dist/models/Secret.d.ts +62 -0
- package/dist/models/Secret.js +70 -0
- package/dist/models/SecretCreate.d.ts +44 -0
- package/dist/models/SecretCreate.js +56 -0
- package/dist/models/SecretImportItem.d.ts +38 -0
- package/dist/models/SecretImportItem.js +54 -0
- package/dist/models/SecretImportRequest.d.ts +39 -0
- package/dist/models/SecretImportRequest.js +53 -0
- package/dist/models/SecretImportResult.d.ts +44 -0
- package/dist/models/SecretImportResult.js +58 -0
- package/dist/models/SecretList.d.ts +33 -0
- package/dist/models/SecretList.js +51 -0
- package/dist/models/SecretPut.d.ts +38 -0
- package/dist/models/SecretPut.js +52 -0
- package/dist/models/WebhookEndpoint.d.ts +3 -0
- package/dist/models/WebhookEndpoint.js +4 -1
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.js +25 -0
- package/dist/runtime.js +1 -1
- package/docs/Balance.md +2 -0
- package/docs/BillingApi.md +2 -2
- package/docs/DedicatedIPOffer.md +56 -0
- package/docs/Endpoint.md +68 -0
- package/docs/EndpointCreate.md +50 -0
- package/docs/EndpointList.md +34 -0
- package/docs/EndpointMachine.md +50 -0
- package/docs/EndpointReplicaCounts.md +36 -0
- package/docs/EndpointsApi.md +544 -0
- package/docs/InstancesApi.md +68 -1
- package/docs/Job.md +125 -0
- package/docs/JobAttempt.md +69 -0
- package/docs/JobCreate.md +66 -0
- package/docs/JobGpuTypes.md +36 -0
- package/docs/JobGpuTypesDataInner.md +42 -0
- package/docs/JobLogChunk.md +40 -0
- package/docs/JobLogs.md +36 -0
- package/docs/JobPage.md +36 -0
- package/docs/JobSharingHint.md +39 -0
- package/docs/JobTelemetry.md +40 -0
- package/docs/JobTelemetryPoint.md +42 -0
- package/docs/JobTrial.md +46 -0
- package/docs/JobsApi.md +609 -0
- package/docs/OperationsApi.md +76 -0
- package/docs/Secret.md +45 -0
- package/docs/SecretCreate.md +38 -0
- package/docs/SecretImportItem.md +36 -0
- package/docs/SecretImportRequest.md +36 -0
- package/docs/SecretImportResult.md +38 -0
- package/docs/SecretList.md +34 -0
- package/docs/SecretPut.md +36 -0
- package/docs/SecretsApi.md +450 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +2 -2
- package/src/apis/EndpointsApi.ts +481 -0
- package/src/apis/InstancesApi.ts +52 -0
- package/src/apis/JobsApi.ts +551 -0
- package/src/apis/OperationsApi.ts +59 -0
- package/src/apis/SecretsApi.ts +413 -0
- package/src/apis/index.ts +3 -0
- package/src/models/Balance.ts +8 -0
- package/src/models/CreateWebhookEndpointRequest.ts +4 -1
- package/src/models/DedicatedIPOffer.ts +165 -0
- package/src/models/Endpoint.ts +247 -0
- package/src/models/EndpointCreate.ts +132 -0
- package/src/models/EndpointList.ts +74 -0
- package/src/models/EndpointMachine.ts +151 -0
- package/src/models/EndpointReplicaCounts.ts +75 -0
- package/src/models/Job.ts +538 -0
- package/src/models/JobAttempt.ts +267 -0
- package/src/models/JobCreate.ts +221 -0
- package/src/models/JobGpuTypes.ts +83 -0
- package/src/models/JobGpuTypesDataInner.ts +104 -0
- package/src/models/JobLogChunk.ts +93 -0
- package/src/models/JobLogs.ts +83 -0
- package/src/models/JobPage.ts +83 -0
- package/src/models/JobSharingHint.ts +86 -0
- package/src/models/JobTelemetry.ts +101 -0
- package/src/models/JobTelemetryPoint.ts +102 -0
- package/src/models/JobTrial.ts +132 -0
- package/src/models/Secret.ts +111 -0
- package/src/models/SecretCreate.ts +83 -0
- package/src/models/SecretImportItem.ts +75 -0
- package/src/models/SecretImportRequest.ts +82 -0
- package/src/models/SecretImportResult.ts +84 -0
- package/src/models/SecretList.ts +74 -0
- package/src/models/SecretPut.ts +74 -0
- package/src/models/WebhookEndpoint.ts +4 -1
- package/src/models/index.ts +25 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EndpointReplicaCounts
|
|
16
|
+
*/
|
|
17
|
+
export interface EndpointReplicaCounts {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof EndpointReplicaCounts
|
|
22
|
+
*/
|
|
23
|
+
starting: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof EndpointReplicaCounts
|
|
28
|
+
*/
|
|
29
|
+
ready: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the EndpointReplicaCounts interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfEndpointReplicaCounts(value: object): value is EndpointReplicaCounts;
|
|
35
|
+
export declare function EndpointReplicaCountsFromJSON(json: any): EndpointReplicaCounts;
|
|
36
|
+
export declare function EndpointReplicaCountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointReplicaCounts;
|
|
37
|
+
export declare function EndpointReplicaCountsToJSON(json: any): EndpointReplicaCounts;
|
|
38
|
+
export declare function EndpointReplicaCountsToJSONTyped(value?: EndpointReplicaCounts | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the EndpointReplicaCounts interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfEndpointReplicaCounts(value) {
|
|
18
|
+
if (!('starting' in value) || value['starting'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('ready' in value) || value['ready'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function EndpointReplicaCountsFromJSON(json) {
|
|
25
|
+
return EndpointReplicaCountsFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function EndpointReplicaCountsFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'starting': json['starting'],
|
|
33
|
+
'ready': json['ready'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function EndpointReplicaCountsToJSON(json) {
|
|
37
|
+
return EndpointReplicaCountsToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function EndpointReplicaCountsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'starting': value['starting'],
|
|
45
|
+
'ready': value['ready'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { JobAttempt } from './JobAttempt';
|
|
13
|
+
import type { JobSharingHint } from './JobSharingHint';
|
|
14
|
+
/**
|
|
15
|
+
* A batch job. It names no machine: the machines a job runs on are instances of your organization and appear in the instance list.
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface Job
|
|
19
|
+
*/
|
|
20
|
+
export interface Job {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof Job
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof Job
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof Job
|
|
37
|
+
*/
|
|
38
|
+
image: string;
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @type {Array<string>}
|
|
42
|
+
* @memberof Job
|
|
43
|
+
*/
|
|
44
|
+
command: Array<string>;
|
|
45
|
+
/**
|
|
46
|
+
* The names of the job's environment variables. Values are never returned.
|
|
47
|
+
* @type {Array<string>}
|
|
48
|
+
* @memberof Job
|
|
49
|
+
*/
|
|
50
|
+
envNames: Array<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Names of the organization secrets the job receives. Empty when none.
|
|
53
|
+
* @type {Array<string>}
|
|
54
|
+
* @memberof Job
|
|
55
|
+
*/
|
|
56
|
+
secrets: Array<string>;
|
|
57
|
+
/**
|
|
58
|
+
* The requested GPU model, or an empty string when the job asked for `min_vram_gb` only.
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof Job
|
|
61
|
+
*/
|
|
62
|
+
gpuType: string;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @type {number}
|
|
66
|
+
* @memberof Job
|
|
67
|
+
*/
|
|
68
|
+
minVramGb: number;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {number}
|
|
72
|
+
* @memberof Job
|
|
73
|
+
*/
|
|
74
|
+
memoryHintMb: number | null;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {number}
|
|
78
|
+
* @memberof Job
|
|
79
|
+
*/
|
|
80
|
+
computeHintPct: number | null;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @type {number}
|
|
84
|
+
* @memberof Job
|
|
85
|
+
*/
|
|
86
|
+
timeoutSeconds: number;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @memberof Job
|
|
91
|
+
*/
|
|
92
|
+
maxWaitSeconds: number;
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @type {boolean}
|
|
96
|
+
* @memberof Job
|
|
97
|
+
*/
|
|
98
|
+
allowSharing: boolean;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {boolean}
|
|
102
|
+
* @memberof Job
|
|
103
|
+
*/
|
|
104
|
+
allowRestart: boolean;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {JobIsolationEnum}
|
|
108
|
+
* @memberof Job
|
|
109
|
+
*/
|
|
110
|
+
isolation: JobIsolationEnum;
|
|
111
|
+
/**
|
|
112
|
+
* The GPU slice (NVIDIA MIG profile) a job with `isolation` `hard` runs in during its current or last attempt, such as `3g.40gb`; null for a soft job or one with a whole GPU.
|
|
113
|
+
*
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof Job
|
|
116
|
+
*/
|
|
117
|
+
migProfile: string | null;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @type {string}
|
|
121
|
+
* @memberof Job
|
|
122
|
+
*/
|
|
123
|
+
checkpointPath: string | null;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @type {number}
|
|
127
|
+
* @memberof Job
|
|
128
|
+
*/
|
|
129
|
+
maxRetries: number;
|
|
130
|
+
/**
|
|
131
|
+
*
|
|
132
|
+
* @type {number}
|
|
133
|
+
* @memberof Job
|
|
134
|
+
*/
|
|
135
|
+
maxPricePerHour: number | null;
|
|
136
|
+
/**
|
|
137
|
+
* `queued` is waiting for a GPU, `assigned` has a GPU and is about to start, `running` is running. `succeeded`, `failed` and `cancelled` are final. A job that is retried goes back to `queued`.
|
|
138
|
+
*
|
|
139
|
+
* @type {JobStatusEnum}
|
|
140
|
+
* @memberof Job
|
|
141
|
+
*/
|
|
142
|
+
status: JobStatusEnum;
|
|
143
|
+
/**
|
|
144
|
+
* Why the job is waiting, or why it failed or was retried.
|
|
145
|
+
* @type {string}
|
|
146
|
+
* @memberof Job
|
|
147
|
+
*/
|
|
148
|
+
statusReason: string | null;
|
|
149
|
+
/**
|
|
150
|
+
* True once a cancel has been asked for and until the job stops.
|
|
151
|
+
* @type {boolean}
|
|
152
|
+
* @memberof Job
|
|
153
|
+
*/
|
|
154
|
+
cancelRequested: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* The number of the current or last attempt. 0 before the job is first placed.
|
|
157
|
+
* @type {number}
|
|
158
|
+
* @memberof Job
|
|
159
|
+
*/
|
|
160
|
+
attempt: number;
|
|
161
|
+
/**
|
|
162
|
+
* Reruns after a memory failure, counted against `max_retries`.
|
|
163
|
+
* @type {number}
|
|
164
|
+
* @memberof Job
|
|
165
|
+
*/
|
|
166
|
+
retries: number;
|
|
167
|
+
/**
|
|
168
|
+
* Times the job was stopped for outgrowing its reservation on a full GPU.
|
|
169
|
+
* @type {number}
|
|
170
|
+
* @memberof Job
|
|
171
|
+
*/
|
|
172
|
+
evictions: number;
|
|
173
|
+
/**
|
|
174
|
+
* Times the job exited out of GPU memory.
|
|
175
|
+
* @type {number}
|
|
176
|
+
* @memberof Job
|
|
177
|
+
*/
|
|
178
|
+
oomExits: number;
|
|
179
|
+
/**
|
|
180
|
+
* GPU memory reserved for the current or last attempt, in MiB. For a whole GPU it is the GPU's total memory. It is used for placement and is not a hard cap.
|
|
181
|
+
*
|
|
182
|
+
* @type {number}
|
|
183
|
+
* @memberof Job
|
|
184
|
+
*/
|
|
185
|
+
reservationMb: number | null;
|
|
186
|
+
/**
|
|
187
|
+
* Whether the current or last attempt has a GPU to itself. Null before the job is first placed.
|
|
188
|
+
* @type {boolean}
|
|
189
|
+
* @memberof Job
|
|
190
|
+
*/
|
|
191
|
+
wholeGpu: boolean | null;
|
|
192
|
+
/**
|
|
193
|
+
* The estimate behind the reservation, from the hint or from history, with headroom.
|
|
194
|
+
* @type {number}
|
|
195
|
+
* @memberof Job
|
|
196
|
+
*/
|
|
197
|
+
predictedMb: number | null;
|
|
198
|
+
/**
|
|
199
|
+
* Where the reservation came from: `hint`, `history:org+name`, `history:org+image`, `history:image`, `none` (no hint and no usable history), `not_shared` (the job did not opt in to sharing) or `no_restart` (sharing needs restart). `+retry` is appended once a memory failure has grown the reservation.
|
|
200
|
+
*
|
|
201
|
+
* @type {string}
|
|
202
|
+
* @memberof Job
|
|
203
|
+
*/
|
|
204
|
+
predictionSource: string | null;
|
|
205
|
+
/**
|
|
206
|
+
* The compute duty the current or last attempt was charged on its GPU, 1 to 100. 100 when the job's compute is unknown.
|
|
207
|
+
*
|
|
208
|
+
* @type {number}
|
|
209
|
+
* @memberof Job
|
|
210
|
+
*/
|
|
211
|
+
predictedComputePct: number | null;
|
|
212
|
+
/**
|
|
213
|
+
* Where the compute duty came from: `hint`, `history:org+name`, `history:org+image`, `history:image` or `none` (unknown, counted as 100).
|
|
214
|
+
*
|
|
215
|
+
* @type {string}
|
|
216
|
+
* @memberof Job
|
|
217
|
+
*/
|
|
218
|
+
computePredictionSource: string | null;
|
|
219
|
+
/**
|
|
220
|
+
* The job's highest GPU memory use so far, across attempts, in MiB.
|
|
221
|
+
* @type {number}
|
|
222
|
+
* @memberof Job
|
|
223
|
+
*/
|
|
224
|
+
peakMemoryMb: number | null;
|
|
225
|
+
/**
|
|
226
|
+
* Total memory of the GPU the current or last attempt runs on, in MiB.
|
|
227
|
+
* @type {number}
|
|
228
|
+
* @memberof Job
|
|
229
|
+
*/
|
|
230
|
+
gpuMemoryTotalMb: number | null;
|
|
231
|
+
/**
|
|
232
|
+
* Mean GPU utilization measured during the last finished attempt. See `compute_source` on the attempt for how it was attributed.
|
|
233
|
+
*
|
|
234
|
+
* @type {number}
|
|
235
|
+
* @memberof Job
|
|
236
|
+
*/
|
|
237
|
+
utilMeanPct: number | null;
|
|
238
|
+
/**
|
|
239
|
+
* Share of the last finished attempt's samples with GPU utilization at or above 50%. Close to `util_mean_pct` for a job that runs in on/off bursts, near 0 or 100 for a steady one.
|
|
240
|
+
*
|
|
241
|
+
* @type {number}
|
|
242
|
+
* @memberof Job
|
|
243
|
+
*/
|
|
244
|
+
busyPct: number | null;
|
|
245
|
+
/**
|
|
246
|
+
* Where the job's memory numbers come from: `process` is the GPU's per-process accounting, `limit` means per-process memory was not visible and the reservation stands in for it.
|
|
247
|
+
*
|
|
248
|
+
* @type {JobMemorySourceEnum}
|
|
249
|
+
* @memberof Job
|
|
250
|
+
*/
|
|
251
|
+
memorySource: JobMemorySourceEnum | null;
|
|
252
|
+
/**
|
|
253
|
+
* How the GPU was shared during the last attempt. `mig` is a GPU slice of the job's own.
|
|
254
|
+
* @type {JobSharingModeEnum}
|
|
255
|
+
* @memberof Job
|
|
256
|
+
*/
|
|
257
|
+
sharingMode: JobSharingModeEnum | null;
|
|
258
|
+
/**
|
|
259
|
+
* Seconds the job has spent running on a GPU, across attempts.
|
|
260
|
+
* @type {number}
|
|
261
|
+
* @memberof Job
|
|
262
|
+
*/
|
|
263
|
+
gpuSeconds: number;
|
|
264
|
+
/**
|
|
265
|
+
* The job's share of its machines' price, for display. A GPU's hourly price is split equally between the jobs running on it at the time, so a job that shared a GPU is attributed less than one that had it alone. A job in a GPU slice is attributed its slice's share of the GPU (for example 3/7 for `3g.40gb`). Machine time with no job running is not attributed to any job. The bill of record is the machine's instance billing.
|
|
266
|
+
*
|
|
267
|
+
* @type {number}
|
|
268
|
+
* @memberof Job
|
|
269
|
+
*/
|
|
270
|
+
attributedCostUsd: number;
|
|
271
|
+
/**
|
|
272
|
+
*
|
|
273
|
+
* @type {number}
|
|
274
|
+
* @memberof Job
|
|
275
|
+
*/
|
|
276
|
+
exitCode: number | null;
|
|
277
|
+
/**
|
|
278
|
+
*
|
|
279
|
+
* @type {Date}
|
|
280
|
+
* @memberof Job
|
|
281
|
+
*/
|
|
282
|
+
createdAt: Date;
|
|
283
|
+
/**
|
|
284
|
+
* When the current or last attempt started.
|
|
285
|
+
* @type {Date}
|
|
286
|
+
* @memberof Job
|
|
287
|
+
*/
|
|
288
|
+
startedAt: Date | null;
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* @type {Date}
|
|
292
|
+
* @memberof Job
|
|
293
|
+
*/
|
|
294
|
+
finishedAt: Date | null;
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
* @type {JobSharingHint}
|
|
298
|
+
* @memberof Job
|
|
299
|
+
*/
|
|
300
|
+
sharingHint?: JobSharingHint;
|
|
301
|
+
/**
|
|
302
|
+
* The job's attempts, oldest first. Returned by GET /v1/jobs/{id} only.
|
|
303
|
+
* @type {Array<JobAttempt>}
|
|
304
|
+
* @memberof Job
|
|
305
|
+
*/
|
|
306
|
+
attempts?: Array<JobAttempt>;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* @export
|
|
310
|
+
*/
|
|
311
|
+
export declare const JobIsolationEnum: {
|
|
312
|
+
readonly Soft: "soft";
|
|
313
|
+
readonly Hard: "hard";
|
|
314
|
+
};
|
|
315
|
+
export type JobIsolationEnum = typeof JobIsolationEnum[keyof typeof JobIsolationEnum];
|
|
316
|
+
/**
|
|
317
|
+
* @export
|
|
318
|
+
*/
|
|
319
|
+
export declare const JobStatusEnum: {
|
|
320
|
+
readonly Queued: "queued";
|
|
321
|
+
readonly Assigned: "assigned";
|
|
322
|
+
readonly Running: "running";
|
|
323
|
+
readonly Succeeded: "succeeded";
|
|
324
|
+
readonly Failed: "failed";
|
|
325
|
+
readonly Cancelled: "cancelled";
|
|
326
|
+
};
|
|
327
|
+
export type JobStatusEnum = typeof JobStatusEnum[keyof typeof JobStatusEnum];
|
|
328
|
+
/**
|
|
329
|
+
* @export
|
|
330
|
+
*/
|
|
331
|
+
export declare const JobMemorySourceEnum: {
|
|
332
|
+
readonly Process: "process";
|
|
333
|
+
readonly Limit: "limit";
|
|
334
|
+
};
|
|
335
|
+
export type JobMemorySourceEnum = typeof JobMemorySourceEnum[keyof typeof JobMemorySourceEnum];
|
|
336
|
+
/**
|
|
337
|
+
* @export
|
|
338
|
+
*/
|
|
339
|
+
export declare const JobSharingModeEnum: {
|
|
340
|
+
readonly TimeSlicing: "time_slicing";
|
|
341
|
+
readonly Mps: "mps";
|
|
342
|
+
readonly Mig: "mig";
|
|
343
|
+
};
|
|
344
|
+
export type JobSharingModeEnum = typeof JobSharingModeEnum[keyof typeof JobSharingModeEnum];
|
|
345
|
+
/**
|
|
346
|
+
* Check if a given object implements the Job interface.
|
|
347
|
+
*/
|
|
348
|
+
export declare function instanceOfJob(value: object): value is Job;
|
|
349
|
+
export declare function JobFromJSON(json: any): Job;
|
|
350
|
+
export declare function JobFromJSONTyped(json: any, ignoreDiscriminator: boolean): Job;
|
|
351
|
+
export declare function JobToJSON(json: any): Job;
|
|
352
|
+
export declare function JobToJSONTyped(value?: Job | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { JobAttemptFromJSON, JobAttemptToJSON, } from './JobAttempt';
|
|
15
|
+
import { JobSharingHintFromJSON, JobSharingHintToJSON, } from './JobSharingHint';
|
|
16
|
+
/**
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const JobIsolationEnum = {
|
|
20
|
+
Soft: 'soft',
|
|
21
|
+
Hard: 'hard'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
export const JobStatusEnum = {
|
|
27
|
+
Queued: 'queued',
|
|
28
|
+
Assigned: 'assigned',
|
|
29
|
+
Running: 'running',
|
|
30
|
+
Succeeded: 'succeeded',
|
|
31
|
+
Failed: 'failed',
|
|
32
|
+
Cancelled: 'cancelled'
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* @export
|
|
36
|
+
*/
|
|
37
|
+
export const JobMemorySourceEnum = {
|
|
38
|
+
Process: 'process',
|
|
39
|
+
Limit: 'limit'
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @export
|
|
43
|
+
*/
|
|
44
|
+
export const JobSharingModeEnum = {
|
|
45
|
+
TimeSlicing: 'time_slicing',
|
|
46
|
+
Mps: 'mps',
|
|
47
|
+
Mig: 'mig'
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the Job interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfJob(value) {
|
|
53
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
54
|
+
return false;
|
|
55
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
if (!('image' in value) || value['image'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
if (!('command' in value) || value['command'] === undefined)
|
|
60
|
+
return false;
|
|
61
|
+
if ((!('envNames' in value) && !('env_names' in value)) || (value['envNames'] === undefined && value['env_names'] === undefined))
|
|
62
|
+
return false;
|
|
63
|
+
if (!('secrets' in value) || value['secrets'] === undefined)
|
|
64
|
+
return false;
|
|
65
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
66
|
+
return false;
|
|
67
|
+
if ((!('minVramGb' in value) && !('min_vram_gb' in value)) || (value['minVramGb'] === undefined && value['min_vram_gb'] === undefined))
|
|
68
|
+
return false;
|
|
69
|
+
if ((!('memoryHintMb' in value) && !('memory_hint_mb' in value)) || (value['memoryHintMb'] === undefined && value['memory_hint_mb'] === undefined))
|
|
70
|
+
return false;
|
|
71
|
+
if ((!('computeHintPct' in value) && !('compute_hint_pct' in value)) || (value['computeHintPct'] === undefined && value['compute_hint_pct'] === undefined))
|
|
72
|
+
return false;
|
|
73
|
+
if ((!('timeoutSeconds' in value) && !('timeout_seconds' in value)) || (value['timeoutSeconds'] === undefined && value['timeout_seconds'] === undefined))
|
|
74
|
+
return false;
|
|
75
|
+
if ((!('maxWaitSeconds' in value) && !('max_wait_seconds' in value)) || (value['maxWaitSeconds'] === undefined && value['max_wait_seconds'] === undefined))
|
|
76
|
+
return false;
|
|
77
|
+
if ((!('allowSharing' in value) && !('allow_sharing' in value)) || (value['allowSharing'] === undefined && value['allow_sharing'] === undefined))
|
|
78
|
+
return false;
|
|
79
|
+
if ((!('allowRestart' in value) && !('allow_restart' in value)) || (value['allowRestart'] === undefined && value['allow_restart'] === undefined))
|
|
80
|
+
return false;
|
|
81
|
+
if (!('isolation' in value) || value['isolation'] === undefined)
|
|
82
|
+
return false;
|
|
83
|
+
if ((!('migProfile' in value) && !('mig_profile' in value)) || (value['migProfile'] === undefined && value['mig_profile'] === undefined))
|
|
84
|
+
return false;
|
|
85
|
+
if ((!('checkpointPath' in value) && !('checkpoint_path' in value)) || (value['checkpointPath'] === undefined && value['checkpoint_path'] === undefined))
|
|
86
|
+
return false;
|
|
87
|
+
if ((!('maxRetries' in value) && !('max_retries' in value)) || (value['maxRetries'] === undefined && value['max_retries'] === undefined))
|
|
88
|
+
return false;
|
|
89
|
+
if ((!('maxPricePerHour' in value) && !('max_price_per_hour' in value)) || (value['maxPricePerHour'] === undefined && value['max_price_per_hour'] === undefined))
|
|
90
|
+
return false;
|
|
91
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
92
|
+
return false;
|
|
93
|
+
if ((!('statusReason' in value) && !('status_reason' in value)) || (value['statusReason'] === undefined && value['status_reason'] === undefined))
|
|
94
|
+
return false;
|
|
95
|
+
if ((!('cancelRequested' in value) && !('cancel_requested' in value)) || (value['cancelRequested'] === undefined && value['cancel_requested'] === undefined))
|
|
96
|
+
return false;
|
|
97
|
+
if (!('attempt' in value) || value['attempt'] === undefined)
|
|
98
|
+
return false;
|
|
99
|
+
if (!('retries' in value) || value['retries'] === undefined)
|
|
100
|
+
return false;
|
|
101
|
+
if (!('evictions' in value) || value['evictions'] === undefined)
|
|
102
|
+
return false;
|
|
103
|
+
if ((!('oomExits' in value) && !('oom_exits' in value)) || (value['oomExits'] === undefined && value['oom_exits'] === undefined))
|
|
104
|
+
return false;
|
|
105
|
+
if ((!('reservationMb' in value) && !('reservation_mb' in value)) || (value['reservationMb'] === undefined && value['reservation_mb'] === undefined))
|
|
106
|
+
return false;
|
|
107
|
+
if ((!('wholeGpu' in value) && !('whole_gpu' in value)) || (value['wholeGpu'] === undefined && value['whole_gpu'] === undefined))
|
|
108
|
+
return false;
|
|
109
|
+
if ((!('predictedMb' in value) && !('predicted_mb' in value)) || (value['predictedMb'] === undefined && value['predicted_mb'] === undefined))
|
|
110
|
+
return false;
|
|
111
|
+
if ((!('predictionSource' in value) && !('prediction_source' in value)) || (value['predictionSource'] === undefined && value['prediction_source'] === undefined))
|
|
112
|
+
return false;
|
|
113
|
+
if ((!('predictedComputePct' in value) && !('predicted_compute_pct' in value)) || (value['predictedComputePct'] === undefined && value['predicted_compute_pct'] === undefined))
|
|
114
|
+
return false;
|
|
115
|
+
if ((!('computePredictionSource' in value) && !('compute_prediction_source' in value)) || (value['computePredictionSource'] === undefined && value['compute_prediction_source'] === undefined))
|
|
116
|
+
return false;
|
|
117
|
+
if ((!('peakMemoryMb' in value) && !('peak_memory_mb' in value)) || (value['peakMemoryMb'] === undefined && value['peak_memory_mb'] === undefined))
|
|
118
|
+
return false;
|
|
119
|
+
if ((!('gpuMemoryTotalMb' in value) && !('gpu_memory_total_mb' in value)) || (value['gpuMemoryTotalMb'] === undefined && value['gpu_memory_total_mb'] === undefined))
|
|
120
|
+
return false;
|
|
121
|
+
if ((!('utilMeanPct' in value) && !('util_mean_pct' in value)) || (value['utilMeanPct'] === undefined && value['util_mean_pct'] === undefined))
|
|
122
|
+
return false;
|
|
123
|
+
if ((!('busyPct' in value) && !('busy_pct' in value)) || (value['busyPct'] === undefined && value['busy_pct'] === undefined))
|
|
124
|
+
return false;
|
|
125
|
+
if ((!('memorySource' in value) && !('memory_source' in value)) || (value['memorySource'] === undefined && value['memory_source'] === undefined))
|
|
126
|
+
return false;
|
|
127
|
+
if ((!('sharingMode' in value) && !('sharing_mode' in value)) || (value['sharingMode'] === undefined && value['sharing_mode'] === undefined))
|
|
128
|
+
return false;
|
|
129
|
+
if ((!('gpuSeconds' in value) && !('gpu_seconds' in value)) || (value['gpuSeconds'] === undefined && value['gpu_seconds'] === undefined))
|
|
130
|
+
return false;
|
|
131
|
+
if ((!('attributedCostUsd' in value) && !('attributed_cost_usd' in value)) || (value['attributedCostUsd'] === undefined && value['attributed_cost_usd'] === undefined))
|
|
132
|
+
return false;
|
|
133
|
+
if ((!('exitCode' in value) && !('exit_code' in value)) || (value['exitCode'] === undefined && value['exit_code'] === undefined))
|
|
134
|
+
return false;
|
|
135
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
136
|
+
return false;
|
|
137
|
+
if ((!('startedAt' in value) && !('started_at' in value)) || (value['startedAt'] === undefined && value['started_at'] === undefined))
|
|
138
|
+
return false;
|
|
139
|
+
if ((!('finishedAt' in value) && !('finished_at' in value)) || (value['finishedAt'] === undefined && value['finished_at'] === undefined))
|
|
140
|
+
return false;
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
export function JobFromJSON(json) {
|
|
144
|
+
return JobFromJSONTyped(json, false);
|
|
145
|
+
}
|
|
146
|
+
export function JobFromJSONTyped(json, ignoreDiscriminator) {
|
|
147
|
+
if (json == null) {
|
|
148
|
+
return json;
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
'id': json['id'],
|
|
152
|
+
'name': json['name'],
|
|
153
|
+
'image': json['image'],
|
|
154
|
+
'command': json['command'],
|
|
155
|
+
'envNames': json['env_names'],
|
|
156
|
+
'secrets': json['secrets'],
|
|
157
|
+
'gpuType': json['gpu_type'],
|
|
158
|
+
'minVramGb': json['min_vram_gb'],
|
|
159
|
+
'memoryHintMb': json['memory_hint_mb'],
|
|
160
|
+
'computeHintPct': json['compute_hint_pct'],
|
|
161
|
+
'timeoutSeconds': json['timeout_seconds'],
|
|
162
|
+
'maxWaitSeconds': json['max_wait_seconds'],
|
|
163
|
+
'allowSharing': json['allow_sharing'],
|
|
164
|
+
'allowRestart': json['allow_restart'],
|
|
165
|
+
'isolation': json['isolation'],
|
|
166
|
+
'migProfile': json['mig_profile'],
|
|
167
|
+
'checkpointPath': json['checkpoint_path'],
|
|
168
|
+
'maxRetries': json['max_retries'],
|
|
169
|
+
'maxPricePerHour': json['max_price_per_hour'],
|
|
170
|
+
'status': json['status'],
|
|
171
|
+
'statusReason': json['status_reason'],
|
|
172
|
+
'cancelRequested': json['cancel_requested'],
|
|
173
|
+
'attempt': json['attempt'],
|
|
174
|
+
'retries': json['retries'],
|
|
175
|
+
'evictions': json['evictions'],
|
|
176
|
+
'oomExits': json['oom_exits'],
|
|
177
|
+
'reservationMb': json['reservation_mb'],
|
|
178
|
+
'wholeGpu': json['whole_gpu'],
|
|
179
|
+
'predictedMb': json['predicted_mb'],
|
|
180
|
+
'predictionSource': json['prediction_source'],
|
|
181
|
+
'predictedComputePct': json['predicted_compute_pct'],
|
|
182
|
+
'computePredictionSource': json['compute_prediction_source'],
|
|
183
|
+
'peakMemoryMb': json['peak_memory_mb'],
|
|
184
|
+
'gpuMemoryTotalMb': json['gpu_memory_total_mb'],
|
|
185
|
+
'utilMeanPct': json['util_mean_pct'],
|
|
186
|
+
'busyPct': json['busy_pct'],
|
|
187
|
+
'memorySource': json['memory_source'],
|
|
188
|
+
'sharingMode': json['sharing_mode'],
|
|
189
|
+
'gpuSeconds': json['gpu_seconds'],
|
|
190
|
+
'attributedCostUsd': json['attributed_cost_usd'],
|
|
191
|
+
'exitCode': json['exit_code'],
|
|
192
|
+
'createdAt': (new Date(json['created_at'])),
|
|
193
|
+
'startedAt': (json['started_at'] == null ? null : new Date(json['started_at'])),
|
|
194
|
+
'finishedAt': (json['finished_at'] == null ? null : new Date(json['finished_at'])),
|
|
195
|
+
'sharingHint': json['sharing_hint'] == null ? undefined : JobSharingHintFromJSON(json['sharing_hint']),
|
|
196
|
+
'attempts': json['attempts'] == null ? undefined : (json['attempts'].map(JobAttemptFromJSON)),
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
export function JobToJSON(json) {
|
|
200
|
+
return JobToJSONTyped(json, false);
|
|
201
|
+
}
|
|
202
|
+
export function JobToJSONTyped(value, ignoreDiscriminator = false) {
|
|
203
|
+
if (value == null) {
|
|
204
|
+
return value;
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
'id': value['id'],
|
|
208
|
+
'name': value['name'],
|
|
209
|
+
'image': value['image'],
|
|
210
|
+
'command': value['command'],
|
|
211
|
+
'env_names': value['envNames'],
|
|
212
|
+
'secrets': value['secrets'],
|
|
213
|
+
'gpu_type': value['gpuType'],
|
|
214
|
+
'min_vram_gb': value['minVramGb'],
|
|
215
|
+
'memory_hint_mb': value['memoryHintMb'],
|
|
216
|
+
'compute_hint_pct': value['computeHintPct'],
|
|
217
|
+
'timeout_seconds': value['timeoutSeconds'],
|
|
218
|
+
'max_wait_seconds': value['maxWaitSeconds'],
|
|
219
|
+
'allow_sharing': value['allowSharing'],
|
|
220
|
+
'allow_restart': value['allowRestart'],
|
|
221
|
+
'isolation': value['isolation'],
|
|
222
|
+
'mig_profile': value['migProfile'],
|
|
223
|
+
'checkpoint_path': value['checkpointPath'],
|
|
224
|
+
'max_retries': value['maxRetries'],
|
|
225
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
226
|
+
'status': value['status'],
|
|
227
|
+
'status_reason': value['statusReason'],
|
|
228
|
+
'cancel_requested': value['cancelRequested'],
|
|
229
|
+
'attempt': value['attempt'],
|
|
230
|
+
'retries': value['retries'],
|
|
231
|
+
'evictions': value['evictions'],
|
|
232
|
+
'oom_exits': value['oomExits'],
|
|
233
|
+
'reservation_mb': value['reservationMb'],
|
|
234
|
+
'whole_gpu': value['wholeGpu'],
|
|
235
|
+
'predicted_mb': value['predictedMb'],
|
|
236
|
+
'prediction_source': value['predictionSource'],
|
|
237
|
+
'predicted_compute_pct': value['predictedComputePct'],
|
|
238
|
+
'compute_prediction_source': value['computePredictionSource'],
|
|
239
|
+
'peak_memory_mb': value['peakMemoryMb'],
|
|
240
|
+
'gpu_memory_total_mb': value['gpuMemoryTotalMb'],
|
|
241
|
+
'util_mean_pct': value['utilMeanPct'],
|
|
242
|
+
'busy_pct': value['busyPct'],
|
|
243
|
+
'memory_source': value['memorySource'],
|
|
244
|
+
'sharing_mode': value['sharingMode'],
|
|
245
|
+
'gpu_seconds': value['gpuSeconds'],
|
|
246
|
+
'attributed_cost_usd': value['attributedCostUsd'],
|
|
247
|
+
'exit_code': value['exitCode'],
|
|
248
|
+
'created_at': value['createdAt'].toISOString(),
|
|
249
|
+
'started_at': value['startedAt'] == null ? value['startedAt'] : value['startedAt'].toISOString(),
|
|
250
|
+
'finished_at': value['finishedAt'] == null ? value['finishedAt'] : value['finishedAt'].toISOString(),
|
|
251
|
+
'sharing_hint': JobSharingHintToJSON(value['sharingHint']),
|
|
252
|
+
'attempts': value['attempts'] == null ? undefined : (value['attempts'].map(JobAttemptToJSON)),
|
|
253
|
+
};
|
|
254
|
+
}
|