@gpuai/sdk 0.5.4 → 0.5.6
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/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/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/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/Operation.d.ts +6 -0
- package/dist/esm/models/Operation.js +2 -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/index.d.ts +25 -0
- package/dist/esm/models/index.js +25 -0
- package/dist/esm/runtime.js +1 -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/Operation.d.ts +6 -0
- package/dist/models/Operation.js +2 -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/index.d.ts +25 -0
- package/dist/models/index.js +25 -0
- package/dist/runtime.js +1 -1
- 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/Operation.md +2 -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/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/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/Operation.ts +8 -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/index.ts +25 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,176 @@
|
|
|
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
|
+
* One run of a job.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface JobAttempt
|
|
16
|
+
*/
|
|
17
|
+
export interface JobAttempt {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof JobAttempt
|
|
22
|
+
*/
|
|
23
|
+
attempt: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof JobAttempt
|
|
28
|
+
*/
|
|
29
|
+
reservationMb: number | null;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof JobAttempt
|
|
34
|
+
*/
|
|
35
|
+
wholeGpu: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof JobAttempt
|
|
40
|
+
*/
|
|
41
|
+
predictionSource: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* How the attempt ended. `oom` is an out-of-memory exit, `evicted` is a stop for outgrowing the reservation on a full GPU, `lost` means the machine or the container disappeared, and `infra` means the GPU's sharing layer failed under the job. `lost` and `infra` do not use a retry. Null while the attempt is in progress.
|
|
44
|
+
*
|
|
45
|
+
* @type {JobAttemptOutcomeEnum}
|
|
46
|
+
* @memberof JobAttempt
|
|
47
|
+
*/
|
|
48
|
+
outcome: JobAttemptOutcomeEnum | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof JobAttempt
|
|
53
|
+
*/
|
|
54
|
+
reason: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof JobAttempt
|
|
59
|
+
*/
|
|
60
|
+
exitCode: number | null;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof JobAttempt
|
|
65
|
+
*/
|
|
66
|
+
peakMemoryMb: number | null;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof JobAttempt
|
|
71
|
+
*/
|
|
72
|
+
predictedComputePct: number | null;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof JobAttempt
|
|
77
|
+
*/
|
|
78
|
+
utilMeanPct: number | null;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof JobAttempt
|
|
83
|
+
*/
|
|
84
|
+
busyPct: number | null;
|
|
85
|
+
/**
|
|
86
|
+
* How the attempt's compute profile was attributed. `process` is the job's own per-process utilization, measured even while it shared. `solo` uses the GPU's utilization while the job was alone on it. `shared_upper_bound` uses the GPU's utilization while it shared, which over-states the job's own.
|
|
87
|
+
*
|
|
88
|
+
* @type {JobAttemptComputeSourceEnum}
|
|
89
|
+
* @memberof JobAttempt
|
|
90
|
+
*/
|
|
91
|
+
computeSource: JobAttemptComputeSourceEnum | null;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {JobAttemptMemorySourceEnum}
|
|
95
|
+
* @memberof JobAttempt
|
|
96
|
+
*/
|
|
97
|
+
memorySource: JobAttemptMemorySourceEnum | null;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {JobAttemptSharingModeEnum}
|
|
101
|
+
* @memberof JobAttempt
|
|
102
|
+
*/
|
|
103
|
+
sharingMode: JobAttemptSharingModeEnum | null;
|
|
104
|
+
/**
|
|
105
|
+
* The GPU slice the attempt ran in, or null.
|
|
106
|
+
* @type {string}
|
|
107
|
+
* @memberof JobAttempt
|
|
108
|
+
*/
|
|
109
|
+
migProfile: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* Whether the attempt started with files already in its checkpoint directory.
|
|
112
|
+
* @type {boolean}
|
|
113
|
+
* @memberof JobAttempt
|
|
114
|
+
*/
|
|
115
|
+
resumed: boolean;
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* @type {Date}
|
|
119
|
+
* @memberof JobAttempt
|
|
120
|
+
*/
|
|
121
|
+
startedAt: Date | null;
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* @type {Date}
|
|
125
|
+
* @memberof JobAttempt
|
|
126
|
+
*/
|
|
127
|
+
endedAt: Date | null;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @export
|
|
131
|
+
*/
|
|
132
|
+
export declare const JobAttemptOutcomeEnum: {
|
|
133
|
+
readonly Succeeded: "succeeded";
|
|
134
|
+
readonly Failed: "failed";
|
|
135
|
+
readonly Oom: "oom";
|
|
136
|
+
readonly Evicted: "evicted";
|
|
137
|
+
readonly Timeout: "timeout";
|
|
138
|
+
readonly Cancelled: "cancelled";
|
|
139
|
+
readonly Lost: "lost";
|
|
140
|
+
readonly Infra: "infra";
|
|
141
|
+
};
|
|
142
|
+
export type JobAttemptOutcomeEnum = typeof JobAttemptOutcomeEnum[keyof typeof JobAttemptOutcomeEnum];
|
|
143
|
+
/**
|
|
144
|
+
* @export
|
|
145
|
+
*/
|
|
146
|
+
export declare const JobAttemptComputeSourceEnum: {
|
|
147
|
+
readonly Process: "process";
|
|
148
|
+
readonly Solo: "solo";
|
|
149
|
+
readonly SharedUpperBound: "shared_upper_bound";
|
|
150
|
+
};
|
|
151
|
+
export type JobAttemptComputeSourceEnum = typeof JobAttemptComputeSourceEnum[keyof typeof JobAttemptComputeSourceEnum];
|
|
152
|
+
/**
|
|
153
|
+
* @export
|
|
154
|
+
*/
|
|
155
|
+
export declare const JobAttemptMemorySourceEnum: {
|
|
156
|
+
readonly Process: "process";
|
|
157
|
+
readonly Limit: "limit";
|
|
158
|
+
};
|
|
159
|
+
export type JobAttemptMemorySourceEnum = typeof JobAttemptMemorySourceEnum[keyof typeof JobAttemptMemorySourceEnum];
|
|
160
|
+
/**
|
|
161
|
+
* @export
|
|
162
|
+
*/
|
|
163
|
+
export declare const JobAttemptSharingModeEnum: {
|
|
164
|
+
readonly TimeSlicing: "time_slicing";
|
|
165
|
+
readonly Mps: "mps";
|
|
166
|
+
readonly Mig: "mig";
|
|
167
|
+
};
|
|
168
|
+
export type JobAttemptSharingModeEnum = typeof JobAttemptSharingModeEnum[keyof typeof JobAttemptSharingModeEnum];
|
|
169
|
+
/**
|
|
170
|
+
* Check if a given object implements the JobAttempt interface.
|
|
171
|
+
*/
|
|
172
|
+
export declare function instanceOfJobAttempt(value: object): value is JobAttempt;
|
|
173
|
+
export declare function JobAttemptFromJSON(json: any): JobAttempt;
|
|
174
|
+
export declare function JobAttemptFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobAttempt;
|
|
175
|
+
export declare function JobAttemptToJSON(json: any): JobAttempt;
|
|
176
|
+
export declare function JobAttemptToJSONTyped(value?: JobAttempt | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,147 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const JobAttemptOutcomeEnum = {
|
|
18
|
+
Succeeded: 'succeeded',
|
|
19
|
+
Failed: 'failed',
|
|
20
|
+
Oom: 'oom',
|
|
21
|
+
Evicted: 'evicted',
|
|
22
|
+
Timeout: 'timeout',
|
|
23
|
+
Cancelled: 'cancelled',
|
|
24
|
+
Lost: 'lost',
|
|
25
|
+
Infra: 'infra'
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export const JobAttemptComputeSourceEnum = {
|
|
31
|
+
Process: 'process',
|
|
32
|
+
Solo: 'solo',
|
|
33
|
+
SharedUpperBound: 'shared_upper_bound'
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @export
|
|
37
|
+
*/
|
|
38
|
+
export const JobAttemptMemorySourceEnum = {
|
|
39
|
+
Process: 'process',
|
|
40
|
+
Limit: 'limit'
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
export const JobAttemptSharingModeEnum = {
|
|
46
|
+
TimeSlicing: 'time_slicing',
|
|
47
|
+
Mps: 'mps',
|
|
48
|
+
Mig: 'mig'
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the JobAttempt interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfJobAttempt(value) {
|
|
54
|
+
if (!('attempt' in value) || value['attempt'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if ((!('reservationMb' in value) && !('reservation_mb' in value)) || (value['reservationMb'] === undefined && value['reservation_mb'] === undefined))
|
|
57
|
+
return false;
|
|
58
|
+
if ((!('wholeGpu' in value) && !('whole_gpu' in value)) || (value['wholeGpu'] === undefined && value['whole_gpu'] === undefined))
|
|
59
|
+
return false;
|
|
60
|
+
if ((!('predictionSource' in value) && !('prediction_source' in value)) || (value['predictionSource'] === undefined && value['prediction_source'] === undefined))
|
|
61
|
+
return false;
|
|
62
|
+
if (!('outcome' in value) || value['outcome'] === undefined)
|
|
63
|
+
return false;
|
|
64
|
+
if (!('reason' in value) || value['reason'] === undefined)
|
|
65
|
+
return false;
|
|
66
|
+
if ((!('exitCode' in value) && !('exit_code' in value)) || (value['exitCode'] === undefined && value['exit_code'] === undefined))
|
|
67
|
+
return false;
|
|
68
|
+
if ((!('peakMemoryMb' in value) && !('peak_memory_mb' in value)) || (value['peakMemoryMb'] === undefined && value['peak_memory_mb'] === undefined))
|
|
69
|
+
return false;
|
|
70
|
+
if ((!('predictedComputePct' in value) && !('predicted_compute_pct' in value)) || (value['predictedComputePct'] === undefined && value['predicted_compute_pct'] === undefined))
|
|
71
|
+
return false;
|
|
72
|
+
if ((!('utilMeanPct' in value) && !('util_mean_pct' in value)) || (value['utilMeanPct'] === undefined && value['util_mean_pct'] === undefined))
|
|
73
|
+
return false;
|
|
74
|
+
if ((!('busyPct' in value) && !('busy_pct' in value)) || (value['busyPct'] === undefined && value['busy_pct'] === undefined))
|
|
75
|
+
return false;
|
|
76
|
+
if ((!('computeSource' in value) && !('compute_source' in value)) || (value['computeSource'] === undefined && value['compute_source'] === undefined))
|
|
77
|
+
return false;
|
|
78
|
+
if ((!('memorySource' in value) && !('memory_source' in value)) || (value['memorySource'] === undefined && value['memory_source'] === undefined))
|
|
79
|
+
return false;
|
|
80
|
+
if ((!('sharingMode' in value) && !('sharing_mode' in value)) || (value['sharingMode'] === undefined && value['sharing_mode'] === undefined))
|
|
81
|
+
return false;
|
|
82
|
+
if ((!('migProfile' in value) && !('mig_profile' in value)) || (value['migProfile'] === undefined && value['mig_profile'] === undefined))
|
|
83
|
+
return false;
|
|
84
|
+
if (!('resumed' in value) || value['resumed'] === undefined)
|
|
85
|
+
return false;
|
|
86
|
+
if ((!('startedAt' in value) && !('started_at' in value)) || (value['startedAt'] === undefined && value['started_at'] === undefined))
|
|
87
|
+
return false;
|
|
88
|
+
if ((!('endedAt' in value) && !('ended_at' in value)) || (value['endedAt'] === undefined && value['ended_at'] === undefined))
|
|
89
|
+
return false;
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
export function JobAttemptFromJSON(json) {
|
|
93
|
+
return JobAttemptFromJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
export function JobAttemptFromJSONTyped(json, ignoreDiscriminator) {
|
|
96
|
+
if (json == null) {
|
|
97
|
+
return json;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
'attempt': json['attempt'],
|
|
101
|
+
'reservationMb': json['reservation_mb'],
|
|
102
|
+
'wholeGpu': json['whole_gpu'],
|
|
103
|
+
'predictionSource': json['prediction_source'],
|
|
104
|
+
'outcome': json['outcome'],
|
|
105
|
+
'reason': json['reason'],
|
|
106
|
+
'exitCode': json['exit_code'],
|
|
107
|
+
'peakMemoryMb': json['peak_memory_mb'],
|
|
108
|
+
'predictedComputePct': json['predicted_compute_pct'],
|
|
109
|
+
'utilMeanPct': json['util_mean_pct'],
|
|
110
|
+
'busyPct': json['busy_pct'],
|
|
111
|
+
'computeSource': json['compute_source'],
|
|
112
|
+
'memorySource': json['memory_source'],
|
|
113
|
+
'sharingMode': json['sharing_mode'],
|
|
114
|
+
'migProfile': json['mig_profile'],
|
|
115
|
+
'resumed': json['resumed'],
|
|
116
|
+
'startedAt': (json['started_at'] == null ? null : new Date(json['started_at'])),
|
|
117
|
+
'endedAt': (json['ended_at'] == null ? null : new Date(json['ended_at'])),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export function JobAttemptToJSON(json) {
|
|
121
|
+
return JobAttemptToJSONTyped(json, false);
|
|
122
|
+
}
|
|
123
|
+
export function JobAttemptToJSONTyped(value, ignoreDiscriminator = false) {
|
|
124
|
+
if (value == null) {
|
|
125
|
+
return value;
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
'attempt': value['attempt'],
|
|
129
|
+
'reservation_mb': value['reservationMb'],
|
|
130
|
+
'whole_gpu': value['wholeGpu'],
|
|
131
|
+
'prediction_source': value['predictionSource'],
|
|
132
|
+
'outcome': value['outcome'],
|
|
133
|
+
'reason': value['reason'],
|
|
134
|
+
'exit_code': value['exitCode'],
|
|
135
|
+
'peak_memory_mb': value['peakMemoryMb'],
|
|
136
|
+
'predicted_compute_pct': value['predictedComputePct'],
|
|
137
|
+
'util_mean_pct': value['utilMeanPct'],
|
|
138
|
+
'busy_pct': value['busyPct'],
|
|
139
|
+
'compute_source': value['computeSource'],
|
|
140
|
+
'memory_source': value['memorySource'],
|
|
141
|
+
'sharing_mode': value['sharingMode'],
|
|
142
|
+
'mig_profile': value['migProfile'],
|
|
143
|
+
'resumed': value['resumed'],
|
|
144
|
+
'started_at': value['startedAt'] == null ? value['startedAt'] : value['startedAt'].toISOString(),
|
|
145
|
+
'ended_at': value['endedAt'] == null ? value['endedAt'] : value['endedAt'].toISOString(),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
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 JobCreate
|
|
16
|
+
*/
|
|
17
|
+
export interface JobCreate {
|
|
18
|
+
/**
|
|
19
|
+
* A label for the job. Jobs whose names match once digits are removed (`train-run-17`, `train-run-18`) are treated as repeats of the same work, and the peak memory of earlier finished runs is used to size later ones. Naming repeat jobs consistently is the simplest way to have them share a GPU without a memory hint.
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof JobCreate
|
|
23
|
+
*/
|
|
24
|
+
name?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The container image to run, such as `registry.example.com/team/train:1.2`. The machine must be able to pull it without credentials.
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof JobCreate
|
|
30
|
+
*/
|
|
31
|
+
image: string;
|
|
32
|
+
/**
|
|
33
|
+
* The program and its arguments. The first item replaces the image's entrypoint and the rest are its arguments, so `["python", "train.py", "--epochs", "3"]` runs exactly that.
|
|
34
|
+
*
|
|
35
|
+
* @type {Array<string>}
|
|
36
|
+
* @memberof JobCreate
|
|
37
|
+
*/
|
|
38
|
+
command: Array<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Environment variables for the job, at most 100. Names starting with `GPUAI_` are reserved. Values are stored to run the job and are never returned by the API.
|
|
41
|
+
*
|
|
42
|
+
* @type {{ [key: string]: string; }}
|
|
43
|
+
* @memberof JobCreate
|
|
44
|
+
*/
|
|
45
|
+
env?: {
|
|
46
|
+
[key: string]: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The GPU model to run on, as in GET /v1/gpu-types. One of `gpu_type` or `min_vram_gb` is required.
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof JobCreate
|
|
53
|
+
*/
|
|
54
|
+
gpuType?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Run on any GPU model with at least this much memory, in GB. Used when `gpu_type` is not given.
|
|
57
|
+
*
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof JobCreate
|
|
60
|
+
*/
|
|
61
|
+
minVramGb?: number;
|
|
62
|
+
/**
|
|
63
|
+
* The peak GPU memory you expect the job to use, in MiB. The reservation is the hint plus headroom (15% and 512 MiB). Without a hint the platform uses the history of earlier finished jobs, and a job with neither gets a whole GPU.
|
|
64
|
+
*
|
|
65
|
+
* @type {number}
|
|
66
|
+
* @memberof JobCreate
|
|
67
|
+
*/
|
|
68
|
+
memoryHintMb?: number | null;
|
|
69
|
+
/**
|
|
70
|
+
* The share of time you expect the job to keep the GPU busy, 1 to 100. Jobs share a GPU only while the sum of their compute duties stays at or under 100. Without a hint the platform uses the measured utilization of earlier finished jobs with the same name or image, and a job with neither counts as 100 (a GPU to itself).
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof JobCreate
|
|
74
|
+
*/
|
|
75
|
+
computeHintPct?: number | null;
|
|
76
|
+
/**
|
|
77
|
+
* The job is stopped and fails after running this long.
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof JobCreate
|
|
80
|
+
*/
|
|
81
|
+
timeoutSeconds?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Opt in to waiting. When no machine in your pool has room, wait up to this long for space before starting a new machine. 0 starts a machine at once.
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @memberof JobCreate
|
|
87
|
+
*/
|
|
88
|
+
maxWaitSeconds?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Opt in to sharing. The job may run on the same GPU as other jobs from your own organization that also opted in. Needs `allow_restart`, and a memory hint or usable history; otherwise the job still gets a whole GPU. A GPU is never shared with another customer.
|
|
91
|
+
*
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
* @memberof JobCreate
|
|
94
|
+
*/
|
|
95
|
+
allowSharing?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Opt in to restart. The platform may stop the job and run it again: after it runs out of GPU memory, after it outgrows its reservation on a full GPU, or after its machine is lost. Use the checkpoint directory to resume instead of starting over.
|
|
98
|
+
*
|
|
99
|
+
* @type {boolean}
|
|
100
|
+
* @memberof JobCreate
|
|
101
|
+
*/
|
|
102
|
+
allowRestart?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* `soft` (the default) is the sharing described under `allow_sharing`. `hard` runs the job in a GPU slice of its own (NVIDIA MIG): its own memory, its own compute and its own fault domain, so another job on the same GPU cannot slow it down, take its memory or crash it. The slice is the smallest that holds the memory hint or the job's history; without either, or when no slice is large enough, the job gets a whole GPU. A slice has a share of the GPU's compute in proportion to its size, so a job in a small slice runs slower than on a whole GPU. Needs `gpu_type` set to a model that supports slices (`a100_80gb` or `h100_pcie`), and cannot be combined with `allow_sharing`. Not available until enabled for your organization.
|
|
105
|
+
*
|
|
106
|
+
* @type {JobCreateIsolationEnum}
|
|
107
|
+
* @memberof JobCreate
|
|
108
|
+
*/
|
|
109
|
+
isolation?: JobCreateIsolationEnum;
|
|
110
|
+
/**
|
|
111
|
+
* Where the job's checkpoint directory is mounted inside the container. Defaults to `/gpuai/checkpoint`. The same path is in the `GPUAI_CHECKPOINT_DIR` environment variable. Files written there are still present when the job is run again on the same machine. They do not follow the job to another machine.
|
|
112
|
+
*
|
|
113
|
+
* @type {string}
|
|
114
|
+
* @memberof JobCreate
|
|
115
|
+
*/
|
|
116
|
+
checkpointPath?: string;
|
|
117
|
+
/**
|
|
118
|
+
* How many times to rerun the job after it runs out of GPU memory or is stopped for outgrowing its reservation. Defaults to 2. Other failures are never retried.
|
|
119
|
+
*
|
|
120
|
+
* @type {number}
|
|
121
|
+
* @memberof JobCreate
|
|
122
|
+
*/
|
|
123
|
+
maxRetries?: number | null;
|
|
124
|
+
/**
|
|
125
|
+
* Only run on a machine whose hourly price is at most this. Machines are launched on the cheapest suitable listing in any region.
|
|
126
|
+
*
|
|
127
|
+
* @type {number}
|
|
128
|
+
* @memberof JobCreate
|
|
129
|
+
*/
|
|
130
|
+
maxPricePerHour?: number | null;
|
|
131
|
+
/**
|
|
132
|
+
* Names of organization secrets (POST /secrets) the job's container receives as environment variables of the same names. Values are never in a response or a log. Returns 422 `validation_failed` when a name does not exist or secrets are not enabled on this deployment.
|
|
133
|
+
* @type {Array<string>}
|
|
134
|
+
* @memberof JobCreate
|
|
135
|
+
*/
|
|
136
|
+
secrets?: Array<string>;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @export
|
|
140
|
+
*/
|
|
141
|
+
export declare const JobCreateIsolationEnum: {
|
|
142
|
+
readonly Soft: "soft";
|
|
143
|
+
readonly Hard: "hard";
|
|
144
|
+
};
|
|
145
|
+
export type JobCreateIsolationEnum = typeof JobCreateIsolationEnum[keyof typeof JobCreateIsolationEnum];
|
|
146
|
+
/**
|
|
147
|
+
* Check if a given object implements the JobCreate interface.
|
|
148
|
+
*/
|
|
149
|
+
export declare function instanceOfJobCreate(value: object): value is JobCreate;
|
|
150
|
+
export declare function JobCreateFromJSON(json: any): JobCreate;
|
|
151
|
+
export declare function JobCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobCreate;
|
|
152
|
+
export declare function JobCreateToJSON(json: any): JobCreate;
|
|
153
|
+
export declare function JobCreateToJSONTyped(value?: JobCreate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const JobCreateIsolationEnum = {
|
|
18
|
+
Soft: 'soft',
|
|
19
|
+
Hard: 'hard'
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the JobCreate interface.
|
|
23
|
+
*/
|
|
24
|
+
export function instanceOfJobCreate(value) {
|
|
25
|
+
if (!('image' in value) || value['image'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('command' in value) || value['command'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function JobCreateFromJSON(json) {
|
|
32
|
+
return JobCreateFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function JobCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
40
|
+
'image': json['image'],
|
|
41
|
+
'command': json['command'],
|
|
42
|
+
'env': json['env'] == null ? undefined : json['env'],
|
|
43
|
+
'gpuType': json['gpu_type'] == null ? undefined : json['gpu_type'],
|
|
44
|
+
'minVramGb': json['min_vram_gb'] == null ? undefined : json['min_vram_gb'],
|
|
45
|
+
'memoryHintMb': json['memory_hint_mb'] === undefined ? undefined : json['memory_hint_mb'] === null ? null : json['memory_hint_mb'],
|
|
46
|
+
'computeHintPct': json['compute_hint_pct'] === undefined ? undefined : json['compute_hint_pct'] === null ? null : json['compute_hint_pct'],
|
|
47
|
+
'timeoutSeconds': json['timeout_seconds'] == null ? undefined : json['timeout_seconds'],
|
|
48
|
+
'maxWaitSeconds': json['max_wait_seconds'] == null ? undefined : json['max_wait_seconds'],
|
|
49
|
+
'allowSharing': json['allow_sharing'] == null ? undefined : json['allow_sharing'],
|
|
50
|
+
'allowRestart': json['allow_restart'] == null ? undefined : json['allow_restart'],
|
|
51
|
+
'isolation': json['isolation'] == null ? undefined : json['isolation'],
|
|
52
|
+
'checkpointPath': json['checkpoint_path'] == null ? undefined : json['checkpoint_path'],
|
|
53
|
+
'maxRetries': json['max_retries'] === undefined ? undefined : json['max_retries'] === null ? null : json['max_retries'],
|
|
54
|
+
'maxPricePerHour': json['max_price_per_hour'] === undefined ? undefined : json['max_price_per_hour'] === null ? null : json['max_price_per_hour'],
|
|
55
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function JobCreateToJSON(json) {
|
|
59
|
+
return JobCreateToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
export function JobCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
'name': value['name'],
|
|
67
|
+
'image': value['image'],
|
|
68
|
+
'command': value['command'],
|
|
69
|
+
'env': value['env'],
|
|
70
|
+
'gpu_type': value['gpuType'],
|
|
71
|
+
'min_vram_gb': value['minVramGb'],
|
|
72
|
+
'memory_hint_mb': value['memoryHintMb'],
|
|
73
|
+
'compute_hint_pct': value['computeHintPct'],
|
|
74
|
+
'timeout_seconds': value['timeoutSeconds'],
|
|
75
|
+
'max_wait_seconds': value['maxWaitSeconds'],
|
|
76
|
+
'allow_sharing': value['allowSharing'],
|
|
77
|
+
'allow_restart': value['allowRestart'],
|
|
78
|
+
'isolation': value['isolation'],
|
|
79
|
+
'checkpoint_path': value['checkpointPath'],
|
|
80
|
+
'max_retries': value['maxRetries'],
|
|
81
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
82
|
+
'secrets': value['secrets'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { JobGpuTypesDataInner } from './JobGpuTypesDataInner';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface JobGpuTypes
|
|
17
|
+
*/
|
|
18
|
+
export interface JobGpuTypes {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<JobGpuTypesDataInner>}
|
|
22
|
+
* @memberof JobGpuTypes
|
|
23
|
+
*/
|
|
24
|
+
data: Array<JobGpuTypesDataInner>;
|
|
25
|
+
/**
|
|
26
|
+
* True when the list is authoritative and any other gpu_type is refused at submit.
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof JobGpuTypes
|
|
29
|
+
*/
|
|
30
|
+
complete: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the JobGpuTypes interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfJobGpuTypes(value: object): value is JobGpuTypes;
|
|
36
|
+
export declare function JobGpuTypesFromJSON(json: any): JobGpuTypes;
|
|
37
|
+
export declare function JobGpuTypesFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobGpuTypes;
|
|
38
|
+
export declare function JobGpuTypesToJSON(json: any): JobGpuTypes;
|
|
39
|
+
export declare function JobGpuTypesToJSONTyped(value?: JobGpuTypes | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { JobGpuTypesDataInnerFromJSON, JobGpuTypesDataInnerToJSON, } from './JobGpuTypesDataInner';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the JobGpuTypes interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfJobGpuTypes(value) {
|
|
19
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('complete' in value) || value['complete'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function JobGpuTypesFromJSON(json) {
|
|
26
|
+
return JobGpuTypesFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function JobGpuTypesFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'data': (json['data'].map(JobGpuTypesDataInnerFromJSON)),
|
|
34
|
+
'complete': json['complete'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function JobGpuTypesToJSON(json) {
|
|
38
|
+
return JobGpuTypesToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function JobGpuTypesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'data': (value['data'].map(JobGpuTypesDataInnerToJSON)),
|
|
46
|
+
'complete': value['complete'],
|
|
47
|
+
};
|
|
48
|
+
}
|