@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,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,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.JobCreateIsolationEnum = void 0;
|
|
17
|
+
exports.instanceOfJobCreate = instanceOfJobCreate;
|
|
18
|
+
exports.JobCreateFromJSON = JobCreateFromJSON;
|
|
19
|
+
exports.JobCreateFromJSONTyped = JobCreateFromJSONTyped;
|
|
20
|
+
exports.JobCreateToJSON = JobCreateToJSON;
|
|
21
|
+
exports.JobCreateToJSONTyped = JobCreateToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.JobCreateIsolationEnum = {
|
|
26
|
+
Soft: 'soft',
|
|
27
|
+
Hard: 'hard'
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the JobCreate interface.
|
|
31
|
+
*/
|
|
32
|
+
function instanceOfJobCreate(value) {
|
|
33
|
+
if (!('image' in value) || value['image'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('command' in value) || value['command'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function JobCreateFromJSON(json) {
|
|
40
|
+
return JobCreateFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function JobCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
48
|
+
'image': json['image'],
|
|
49
|
+
'command': json['command'],
|
|
50
|
+
'env': json['env'] == null ? undefined : json['env'],
|
|
51
|
+
'gpuType': json['gpu_type'] == null ? undefined : json['gpu_type'],
|
|
52
|
+
'minVramGb': json['min_vram_gb'] == null ? undefined : json['min_vram_gb'],
|
|
53
|
+
'memoryHintMb': json['memory_hint_mb'] === undefined ? undefined : json['memory_hint_mb'] === null ? null : json['memory_hint_mb'],
|
|
54
|
+
'computeHintPct': json['compute_hint_pct'] === undefined ? undefined : json['compute_hint_pct'] === null ? null : json['compute_hint_pct'],
|
|
55
|
+
'timeoutSeconds': json['timeout_seconds'] == null ? undefined : json['timeout_seconds'],
|
|
56
|
+
'maxWaitSeconds': json['max_wait_seconds'] == null ? undefined : json['max_wait_seconds'],
|
|
57
|
+
'allowSharing': json['allow_sharing'] == null ? undefined : json['allow_sharing'],
|
|
58
|
+
'allowRestart': json['allow_restart'] == null ? undefined : json['allow_restart'],
|
|
59
|
+
'isolation': json['isolation'] == null ? undefined : json['isolation'],
|
|
60
|
+
'checkpointPath': json['checkpoint_path'] == null ? undefined : json['checkpoint_path'],
|
|
61
|
+
'maxRetries': json['max_retries'] === undefined ? undefined : json['max_retries'] === null ? null : json['max_retries'],
|
|
62
|
+
'maxPricePerHour': json['max_price_per_hour'] === undefined ? undefined : json['max_price_per_hour'] === null ? null : json['max_price_per_hour'],
|
|
63
|
+
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function JobCreateToJSON(json) {
|
|
67
|
+
return JobCreateToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
function JobCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
'name': value['name'],
|
|
75
|
+
'image': value['image'],
|
|
76
|
+
'command': value['command'],
|
|
77
|
+
'env': value['env'],
|
|
78
|
+
'gpu_type': value['gpuType'],
|
|
79
|
+
'min_vram_gb': value['minVramGb'],
|
|
80
|
+
'memory_hint_mb': value['memoryHintMb'],
|
|
81
|
+
'compute_hint_pct': value['computeHintPct'],
|
|
82
|
+
'timeout_seconds': value['timeoutSeconds'],
|
|
83
|
+
'max_wait_seconds': value['maxWaitSeconds'],
|
|
84
|
+
'allow_sharing': value['allowSharing'],
|
|
85
|
+
'allow_restart': value['allowRestart'],
|
|
86
|
+
'isolation': value['isolation'],
|
|
87
|
+
'checkpoint_path': value['checkpointPath'],
|
|
88
|
+
'max_retries': value['maxRetries'],
|
|
89
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
90
|
+
'secrets': value['secrets'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -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,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfJobGpuTypes = instanceOfJobGpuTypes;
|
|
17
|
+
exports.JobGpuTypesFromJSON = JobGpuTypesFromJSON;
|
|
18
|
+
exports.JobGpuTypesFromJSONTyped = JobGpuTypesFromJSONTyped;
|
|
19
|
+
exports.JobGpuTypesToJSON = JobGpuTypesToJSON;
|
|
20
|
+
exports.JobGpuTypesToJSONTyped = JobGpuTypesToJSONTyped;
|
|
21
|
+
const JobGpuTypesDataInner_1 = require("./JobGpuTypesDataInner");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the JobGpuTypes interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfJobGpuTypes(value) {
|
|
26
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('complete' in value) || value['complete'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function JobGpuTypesFromJSON(json) {
|
|
33
|
+
return JobGpuTypesFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function JobGpuTypesFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'data': (json['data'].map(JobGpuTypesDataInner_1.JobGpuTypesDataInnerFromJSON)),
|
|
41
|
+
'complete': json['complete'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function JobGpuTypesToJSON(json) {
|
|
45
|
+
return JobGpuTypesToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function JobGpuTypesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'data': (value['data'].map(JobGpuTypesDataInner_1.JobGpuTypesDataInnerToJSON)),
|
|
53
|
+
'complete': value['complete'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 JobGpuTypesDataInner
|
|
16
|
+
*/
|
|
17
|
+
export interface JobGpuTypesDataInner {
|
|
18
|
+
/**
|
|
19
|
+
* The GPU model, as `gpu_type` in `POST /jobs`.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof JobGpuTypesDataInner
|
|
22
|
+
*/
|
|
23
|
+
gpuType: string;
|
|
24
|
+
/**
|
|
25
|
+
* The GPU's memory in GB.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof JobGpuTypesDataInner
|
|
28
|
+
*/
|
|
29
|
+
vramGb: number;
|
|
30
|
+
/**
|
|
31
|
+
* True when a supplier that runs jobs had a one-GPU machine of this type to rent at the last catalog read, a few minutes ago. False means it was only seen earlier: a job for it is accepted and waits for one.
|
|
32
|
+
*
|
|
33
|
+
* @type {boolean}
|
|
34
|
+
* @memberof JobGpuTypesDataInner
|
|
35
|
+
*/
|
|
36
|
+
availableNow: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Cheapest retail price in USD per GPU-hour of such a machine at that read. Null when not available now.
|
|
39
|
+
*
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof JobGpuTypesDataInner
|
|
42
|
+
*/
|
|
43
|
+
pricePerGpuHour: number | null;
|
|
44
|
+
/**
|
|
45
|
+
* When a supplier that runs jobs last listed the type.
|
|
46
|
+
* @type {Date}
|
|
47
|
+
* @memberof JobGpuTypesDataInner
|
|
48
|
+
*/
|
|
49
|
+
lastSeenAt: Date | null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the JobGpuTypesDataInner interface.
|
|
53
|
+
*/
|
|
54
|
+
export declare function instanceOfJobGpuTypesDataInner(value: object): value is JobGpuTypesDataInner;
|
|
55
|
+
export declare function JobGpuTypesDataInnerFromJSON(json: any): JobGpuTypesDataInner;
|
|
56
|
+
export declare function JobGpuTypesDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobGpuTypesDataInner;
|
|
57
|
+
export declare function JobGpuTypesDataInnerToJSON(json: any): JobGpuTypesDataInner;
|
|
58
|
+
export declare function JobGpuTypesDataInnerToJSONTyped(value?: JobGpuTypesDataInner | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfJobGpuTypesDataInner = instanceOfJobGpuTypesDataInner;
|
|
17
|
+
exports.JobGpuTypesDataInnerFromJSON = JobGpuTypesDataInnerFromJSON;
|
|
18
|
+
exports.JobGpuTypesDataInnerFromJSONTyped = JobGpuTypesDataInnerFromJSONTyped;
|
|
19
|
+
exports.JobGpuTypesDataInnerToJSON = JobGpuTypesDataInnerToJSON;
|
|
20
|
+
exports.JobGpuTypesDataInnerToJSONTyped = JobGpuTypesDataInnerToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the JobGpuTypesDataInner interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfJobGpuTypesDataInner(value) {
|
|
25
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('vramGb' in value) && !('vram_gb' in value)) || (value['vramGb'] === undefined && value['vram_gb'] === undefined))
|
|
28
|
+
return false;
|
|
29
|
+
if ((!('availableNow' in value) && !('available_now' in value)) || (value['availableNow'] === undefined && value['available_now'] === undefined))
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('pricePerGpuHour' in value) && !('price_per_gpu_hour' in value)) || (value['pricePerGpuHour'] === undefined && value['price_per_gpu_hour'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
if ((!('lastSeenAt' in value) && !('last_seen_at' in value)) || (value['lastSeenAt'] === undefined && value['last_seen_at'] === undefined))
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function JobGpuTypesDataInnerFromJSON(json) {
|
|
38
|
+
return JobGpuTypesDataInnerFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function JobGpuTypesDataInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'gpuType': json['gpu_type'],
|
|
46
|
+
'vramGb': json['vram_gb'],
|
|
47
|
+
'availableNow': json['available_now'],
|
|
48
|
+
'pricePerGpuHour': json['price_per_gpu_hour'],
|
|
49
|
+
'lastSeenAt': (json['last_seen_at'] == null ? null : new Date(json['last_seen_at'])),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function JobGpuTypesDataInnerToJSON(json) {
|
|
53
|
+
return JobGpuTypesDataInnerToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function JobGpuTypesDataInnerToJSONTyped(value, ignoreDiscriminator = false) {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'gpu_type': value['gpuType'],
|
|
61
|
+
'vram_gb': value['vramGb'],
|
|
62
|
+
'available_now': value['availableNow'],
|
|
63
|
+
'price_per_gpu_hour': value['pricePerGpuHour'],
|
|
64
|
+
'last_seen_at': value['lastSeenAt'] == null ? value['lastSeenAt'] : value['lastSeenAt'].toISOString(),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 JobLogChunk
|
|
16
|
+
*/
|
|
17
|
+
export interface JobLogChunk {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof JobLogChunk
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof JobLogChunk
|
|
28
|
+
*/
|
|
29
|
+
attempt: number;
|
|
30
|
+
/**
|
|
31
|
+
* A piece of the job's combined output, at most 16 KB.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof JobLogChunk
|
|
34
|
+
*/
|
|
35
|
+
text: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof JobLogChunk
|
|
40
|
+
*/
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the JobLogChunk interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfJobLogChunk(value: object): value is JobLogChunk;
|
|
47
|
+
export declare function JobLogChunkFromJSON(json: any): JobLogChunk;
|
|
48
|
+
export declare function JobLogChunkFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobLogChunk;
|
|
49
|
+
export declare function JobLogChunkToJSON(json: any): JobLogChunk;
|
|
50
|
+
export declare function JobLogChunkToJSONTyped(value?: JobLogChunk | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfJobLogChunk = instanceOfJobLogChunk;
|
|
17
|
+
exports.JobLogChunkFromJSON = JobLogChunkFromJSON;
|
|
18
|
+
exports.JobLogChunkFromJSONTyped = JobLogChunkFromJSONTyped;
|
|
19
|
+
exports.JobLogChunkToJSON = JobLogChunkToJSON;
|
|
20
|
+
exports.JobLogChunkToJSONTyped = JobLogChunkToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the JobLogChunk interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfJobLogChunk(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('attempt' in value) || value['attempt'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('text' in value) || value['text'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function JobLogChunkFromJSON(json) {
|
|
36
|
+
return JobLogChunkFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function JobLogChunkFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'attempt': json['attempt'],
|
|
45
|
+
'text': json['text'],
|
|
46
|
+
'createdAt': (new Date(json['created_at'])),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function JobLogChunkToJSON(json) {
|
|
50
|
+
return JobLogChunkToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function JobLogChunkToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'id': value['id'],
|
|
58
|
+
'attempt': value['attempt'],
|
|
59
|
+
'text': value['text'],
|
|
60
|
+
'created_at': value['createdAt'].toISOString(),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -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 { JobLogChunk } from './JobLogChunk';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface JobLogs
|
|
17
|
+
*/
|
|
18
|
+
export interface JobLogs {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<JobLogChunk>}
|
|
22
|
+
* @memberof JobLogs
|
|
23
|
+
*/
|
|
24
|
+
data: Array<JobLogChunk>;
|
|
25
|
+
/**
|
|
26
|
+
* Pass this as `after` to read on from here.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof JobLogs
|
|
29
|
+
*/
|
|
30
|
+
nextAfter: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the JobLogs interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfJobLogs(value: object): value is JobLogs;
|
|
36
|
+
export declare function JobLogsFromJSON(json: any): JobLogs;
|
|
37
|
+
export declare function JobLogsFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobLogs;
|
|
38
|
+
export declare function JobLogsToJSON(json: any): JobLogs;
|
|
39
|
+
export declare function JobLogsToJSONTyped(value?: JobLogs | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfJobLogs = instanceOfJobLogs;
|
|
17
|
+
exports.JobLogsFromJSON = JobLogsFromJSON;
|
|
18
|
+
exports.JobLogsFromJSONTyped = JobLogsFromJSONTyped;
|
|
19
|
+
exports.JobLogsToJSON = JobLogsToJSON;
|
|
20
|
+
exports.JobLogsToJSONTyped = JobLogsToJSONTyped;
|
|
21
|
+
const JobLogChunk_1 = require("./JobLogChunk");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the JobLogs interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfJobLogs(value) {
|
|
26
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('nextAfter' in value) && !('next_after' in value)) || (value['nextAfter'] === undefined && value['next_after'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function JobLogsFromJSON(json) {
|
|
33
|
+
return JobLogsFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function JobLogsFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'data': (json['data'].map(JobLogChunk_1.JobLogChunkFromJSON)),
|
|
41
|
+
'nextAfter': json['next_after'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function JobLogsToJSON(json) {
|
|
45
|
+
return JobLogsToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function JobLogsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'data': (value['data'].map(JobLogChunk_1.JobLogChunkToJSON)),
|
|
53
|
+
'next_after': value['nextAfter'],
|
|
54
|
+
};
|
|
55
|
+
}
|