@gpuai/sdk 0.4.0 → 0.4.2
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 +8 -0
- package/README.md +7 -2
- package/dist/apis/InstancesApi.d.ts +18 -0
- package/dist/apis/InstancesApi.js +49 -0
- package/dist/esm/apis/InstancesApi.d.ts +18 -0
- package/dist/esm/apis/InstancesApi.js +49 -0
- package/dist/esm/models/GpuSuggestion.d.ts +82 -0
- package/dist/esm/models/GpuSuggestion.js +77 -0
- package/dist/esm/models/GpuSuggestionCheaper.d.ts +62 -0
- package/dist/esm/models/GpuSuggestionCheaper.js +63 -0
- package/dist/esm/models/GpuSuggestionGpu.d.ts +50 -0
- package/dist/esm/models/GpuSuggestionGpu.js +55 -0
- package/dist/esm/models/Instance.d.ts +22 -0
- package/dist/esm/models/Instance.js +13 -0
- package/dist/esm/models/InstanceGpuMemory.d.ts +51 -0
- package/dist/esm/models/InstanceGpuMemory.js +55 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/GpuSuggestion.d.ts +82 -0
- package/dist/models/GpuSuggestion.js +85 -0
- package/dist/models/GpuSuggestionCheaper.d.ts +62 -0
- package/dist/models/GpuSuggestionCheaper.js +70 -0
- package/dist/models/GpuSuggestionGpu.d.ts +50 -0
- package/dist/models/GpuSuggestionGpu.js +62 -0
- package/dist/models/Instance.d.ts +22 -0
- package/dist/models/Instance.js +14 -1
- package/dist/models/InstanceGpuMemory.d.ts +51 -0
- package/dist/models/InstanceGpuMemory.js +62 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/dist/runtime.js +1 -1
- package/docs/GpuSuggestion.md +47 -0
- package/docs/GpuSuggestionCheaper.md +45 -0
- package/docs/GpuSuggestionGpu.md +41 -0
- package/docs/Instance.md +4 -0
- package/docs/InstanceGpuMemory.md +41 -0
- package/docs/InstancesApi.md +75 -0
- package/package.json +1 -1
- package/src/apis/InstancesApi.ts +64 -0
- package/src/models/GpuSuggestion.ts +150 -0
- package/src/models/GpuSuggestionCheaper.ts +111 -0
- package/src/models/GpuSuggestionGpu.ts +93 -0
- package/src/models/Instance.ts +33 -0
- package/src/models/InstanceGpuMemory.ts +94 -0
- package/src/models/index.ts +4 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
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 GpuSuggestionGpu interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfGpuSuggestionGpu(value) {
|
|
18
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
19
|
+
return false;
|
|
20
|
+
if ((!('gpuName' in value) && !('gpu_name' in value)) || (value['gpuName'] === undefined && value['gpu_name'] === undefined))
|
|
21
|
+
return false;
|
|
22
|
+
if ((!('vramGb' in value) && !('vram_gb' in value)) || (value['vramGb'] === undefined && value['vram_gb'] === undefined))
|
|
23
|
+
return false;
|
|
24
|
+
if ((!('pricePerHour' in value) && !('price_per_hour' in value)) || (value['pricePerHour'] === undefined && value['price_per_hour'] === undefined))
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function GpuSuggestionGpuFromJSON(json) {
|
|
29
|
+
return GpuSuggestionGpuFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function GpuSuggestionGpuFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'gpuType': json['gpu_type'],
|
|
37
|
+
'gpuName': json['gpu_name'],
|
|
38
|
+
'vramGb': json['vram_gb'],
|
|
39
|
+
'pricePerHour': json['price_per_hour'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function GpuSuggestionGpuToJSON(json) {
|
|
43
|
+
return GpuSuggestionGpuToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function GpuSuggestionGpuToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'gpu_type': value['gpuType'],
|
|
51
|
+
'gpu_name': value['gpuName'],
|
|
52
|
+
'vram_gb': value['vramGb'],
|
|
53
|
+
'price_per_hour': value['pricePerHour'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { InstanceConnection } from './InstanceConnection';
|
|
13
|
+
import type { InstanceGpuMemory } from './InstanceGpuMemory';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -64,6 +65,12 @@ export interface Instance {
|
|
|
64
65
|
* @memberof Instance
|
|
65
66
|
*/
|
|
66
67
|
pricePerHour: number;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {InstanceGpuMemory}
|
|
71
|
+
* @memberof Instance
|
|
72
|
+
*/
|
|
73
|
+
gpuMemory?: InstanceGpuMemory;
|
|
67
74
|
/**
|
|
68
75
|
*
|
|
69
76
|
* @type {InstanceConnection}
|
|
@@ -130,6 +137,12 @@ export interface Instance {
|
|
|
130
137
|
* @memberof Instance
|
|
131
138
|
*/
|
|
132
139
|
unreachableSince?: Date;
|
|
140
|
+
/**
|
|
141
|
+
* How far a launch that is not ready yet has got. machine_requested means the machine was requested and no image download has been reported yet; pulling_image means the image is downloading or unpacking; setting_up means the container is up and the platform is finishing SSH and the GPU check. Present only while status is allocating or starting and the platform is following the boot; absent otherwise. Lets a client with a fixed timeout tell a launch that is still moving from one that is stuck.
|
|
142
|
+
* @type {InstanceBootPhaseEnum}
|
|
143
|
+
* @memberof Instance
|
|
144
|
+
*/
|
|
145
|
+
bootPhase?: InstanceBootPhaseEnum;
|
|
133
146
|
}
|
|
134
147
|
/**
|
|
135
148
|
* @export
|
|
@@ -153,6 +166,15 @@ export declare const InstanceTierEnum: {
|
|
|
153
166
|
readonly OnDemand: "on_demand";
|
|
154
167
|
};
|
|
155
168
|
export type InstanceTierEnum = typeof InstanceTierEnum[keyof typeof InstanceTierEnum];
|
|
169
|
+
/**
|
|
170
|
+
* @export
|
|
171
|
+
*/
|
|
172
|
+
export declare const InstanceBootPhaseEnum: {
|
|
173
|
+
readonly MachineRequested: "machine_requested";
|
|
174
|
+
readonly PullingImage: "pulling_image";
|
|
175
|
+
readonly SettingUp: "setting_up";
|
|
176
|
+
};
|
|
177
|
+
export type InstanceBootPhaseEnum = typeof InstanceBootPhaseEnum[keyof typeof InstanceBootPhaseEnum];
|
|
156
178
|
/**
|
|
157
179
|
* Check if a given object implements the Instance interface.
|
|
158
180
|
*/
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { InstanceConnectionFromJSON, InstanceConnectionToJSON, } from './InstanceConnection';
|
|
15
|
+
import { InstanceGpuMemoryFromJSON, InstanceGpuMemoryToJSON, } from './InstanceGpuMemory';
|
|
15
16
|
/**
|
|
16
17
|
* @export
|
|
17
18
|
*/
|
|
@@ -32,6 +33,14 @@ export const InstanceTierEnum = {
|
|
|
32
33
|
Spot: 'spot',
|
|
33
34
|
OnDemand: 'on_demand'
|
|
34
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* @export
|
|
38
|
+
*/
|
|
39
|
+
export const InstanceBootPhaseEnum = {
|
|
40
|
+
MachineRequested: 'machine_requested',
|
|
41
|
+
PullingImage: 'pulling_image',
|
|
42
|
+
SettingUp: 'setting_up'
|
|
43
|
+
};
|
|
35
44
|
/**
|
|
36
45
|
* Check if a given object implements the Instance interface.
|
|
37
46
|
*/
|
|
@@ -70,6 +79,7 @@ export function InstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
70
79
|
'region': json['region'],
|
|
71
80
|
'tier': json['tier'],
|
|
72
81
|
'pricePerHour': json['price_per_hour'],
|
|
82
|
+
'gpuMemory': json['gpu_memory'] == null ? undefined : InstanceGpuMemoryFromJSON(json['gpu_memory']),
|
|
73
83
|
'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
|
|
74
84
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
75
85
|
'image': json['image'] == null ? undefined : json['image'],
|
|
@@ -81,6 +91,7 @@ export function InstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
91
|
'terminatedAt': json['terminated_at'] == null ? undefined : (new Date(json['terminated_at'])),
|
|
82
92
|
'lastReachableAt': json['last_reachable_at'] == null ? undefined : (new Date(json['last_reachable_at'])),
|
|
83
93
|
'unreachableSince': json['unreachable_since'] == null ? undefined : (new Date(json['unreachable_since'])),
|
|
94
|
+
'bootPhase': json['boot_phase'] == null ? undefined : json['boot_phase'],
|
|
84
95
|
};
|
|
85
96
|
}
|
|
86
97
|
export function InstanceToJSON(json) {
|
|
@@ -99,6 +110,7 @@ export function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
99
110
|
'region': value['region'],
|
|
100
111
|
'tier': value['tier'],
|
|
101
112
|
'price_per_hour': value['pricePerHour'],
|
|
113
|
+
'gpu_memory': InstanceGpuMemoryToJSON(value['gpuMemory']),
|
|
102
114
|
'connection': InstanceConnectionToJSON(value['connection']),
|
|
103
115
|
'disk_gb': value['diskGb'],
|
|
104
116
|
'image': value['image'],
|
|
@@ -110,5 +122,6 @@ export function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
110
122
|
'terminated_at': value['terminatedAt'] == null ? value['terminatedAt'] : value['terminatedAt'].toISOString(),
|
|
111
123
|
'last_reachable_at': value['lastReachableAt'] == null ? value['lastReachableAt'] : value['lastReachableAt'].toISOString(),
|
|
112
124
|
'unreachable_since': value['unreachableSince'] == null ? value['unreachableSince'] : value['unreachableSince'].toISOString(),
|
|
125
|
+
'boot_phase': value['bootPhase'],
|
|
113
126
|
};
|
|
114
127
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
* The highest GPU memory use seen on an instance since launch, from the telemetry every instance reports about every two minutes. On an instance with several GPUs it is the busiest GPU. Absent on an instance until its first sample arrives.
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface InstanceGpuMemory
|
|
17
|
+
*/
|
|
18
|
+
export interface InstanceGpuMemory {
|
|
19
|
+
/**
|
|
20
|
+
* Highest memory in use on the GPU, in MiB.
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof InstanceGpuMemory
|
|
23
|
+
*/
|
|
24
|
+
peakUsedMb: number;
|
|
25
|
+
/**
|
|
26
|
+
* The GPU's total memory, in MiB.
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof InstanceGpuMemory
|
|
29
|
+
*/
|
|
30
|
+
totalMb: number;
|
|
31
|
+
/**
|
|
32
|
+
* How many telemetry samples the peak is taken from.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof InstanceGpuMemory
|
|
35
|
+
*/
|
|
36
|
+
samples: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof InstanceGpuMemory
|
|
41
|
+
*/
|
|
42
|
+
lastSampleAt: Date;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the InstanceGpuMemory interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfInstanceGpuMemory(value: object): value is InstanceGpuMemory;
|
|
48
|
+
export declare function InstanceGpuMemoryFromJSON(json: any): InstanceGpuMemory;
|
|
49
|
+
export declare function InstanceGpuMemoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstanceGpuMemory;
|
|
50
|
+
export declare function InstanceGpuMemoryToJSON(json: any): InstanceGpuMemory;
|
|
51
|
+
export declare function InstanceGpuMemoryToJSONTyped(value?: InstanceGpuMemory | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 InstanceGpuMemory interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfInstanceGpuMemory(value) {
|
|
18
|
+
if ((!('peakUsedMb' in value) && !('peak_used_mb' in value)) || (value['peakUsedMb'] === undefined && value['peak_used_mb'] === undefined))
|
|
19
|
+
return false;
|
|
20
|
+
if ((!('totalMb' in value) && !('total_mb' in value)) || (value['totalMb'] === undefined && value['total_mb'] === undefined))
|
|
21
|
+
return false;
|
|
22
|
+
if (!('samples' in value) || value['samples'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if ((!('lastSampleAt' in value) && !('last_sample_at' in value)) || (value['lastSampleAt'] === undefined && value['last_sample_at'] === undefined))
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function InstanceGpuMemoryFromJSON(json) {
|
|
29
|
+
return InstanceGpuMemoryFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function InstanceGpuMemoryFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'peakUsedMb': json['peak_used_mb'],
|
|
37
|
+
'totalMb': json['total_mb'],
|
|
38
|
+
'samples': json['samples'],
|
|
39
|
+
'lastSampleAt': (new Date(json['last_sample_at'])),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function InstanceGpuMemoryToJSON(json) {
|
|
43
|
+
return InstanceGpuMemoryToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function InstanceGpuMemoryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'peak_used_mb': value['peakUsedMb'],
|
|
51
|
+
'total_mb': value['totalMb'],
|
|
52
|
+
'samples': value['samples'],
|
|
53
|
+
'last_sample_at': value['lastSampleAt'].toISOString(),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -53,6 +53,9 @@ export * from './FunctionVersion';
|
|
|
53
53
|
export * from './GPUType';
|
|
54
54
|
export * from './GPUTypePage';
|
|
55
55
|
export * from './GetHealth200Response';
|
|
56
|
+
export * from './GpuSuggestion';
|
|
57
|
+
export * from './GpuSuggestionCheaper';
|
|
58
|
+
export * from './GpuSuggestionGpu';
|
|
56
59
|
export * from './ImagesGenerationsRequest';
|
|
57
60
|
export * from './ImagesResponse';
|
|
58
61
|
export * from './ImagesResponseDataInner';
|
|
@@ -60,6 +63,7 @@ export * from './ImagesResponseUsage';
|
|
|
60
63
|
export * from './IncludeItem';
|
|
61
64
|
export * from './Instance';
|
|
62
65
|
export * from './InstanceConnection';
|
|
66
|
+
export * from './InstanceGpuMemory';
|
|
63
67
|
export * from './InstancePage';
|
|
64
68
|
export * from './Invoice';
|
|
65
69
|
export * from './InvoiceList';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -55,6 +55,9 @@ export * from './FunctionVersion';
|
|
|
55
55
|
export * from './GPUType';
|
|
56
56
|
export * from './GPUTypePage';
|
|
57
57
|
export * from './GetHealth200Response';
|
|
58
|
+
export * from './GpuSuggestion';
|
|
59
|
+
export * from './GpuSuggestionCheaper';
|
|
60
|
+
export * from './GpuSuggestionGpu';
|
|
58
61
|
export * from './ImagesGenerationsRequest';
|
|
59
62
|
export * from './ImagesResponse';
|
|
60
63
|
export * from './ImagesResponseDataInner';
|
|
@@ -62,6 +65,7 @@ export * from './ImagesResponseUsage';
|
|
|
62
65
|
export * from './IncludeItem';
|
|
63
66
|
export * from './Instance';
|
|
64
67
|
export * from './InstanceConnection';
|
|
68
|
+
export * from './InstanceGpuMemory';
|
|
65
69
|
export * from './InstancePage';
|
|
66
70
|
export * from './Invoice';
|
|
67
71
|
export * from './InvoiceList';
|
package/dist/esm/runtime.js
CHANGED
|
@@ -61,7 +61,7 @@ export class Configuration {
|
|
|
61
61
|
return undefined;
|
|
62
62
|
}
|
|
63
63
|
get headers() {
|
|
64
|
-
return Object.assign({ 'User-Agent': 'gpuai-sdk-ts/0.4.
|
|
64
|
+
return Object.assign({ 'User-Agent': 'gpuai-sdk-ts/0.4.2' }, this.configuration.headers);
|
|
65
65
|
}
|
|
66
66
|
get credentials() {
|
|
67
67
|
return this.configuration.credentials;
|
|
@@ -0,0 +1,82 @@
|
|
|
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 { GpuSuggestionCheaper } from './GpuSuggestionCheaper';
|
|
13
|
+
import type { GpuSuggestionGpu } from './GpuSuggestionGpu';
|
|
14
|
+
/**
|
|
15
|
+
* Whether a lower-priced GPU model would have fit an instance's observed peak GPU memory. It names GPU models and prices only.
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface GpuSuggestion
|
|
19
|
+
*/
|
|
20
|
+
export interface GpuSuggestion {
|
|
21
|
+
/**
|
|
22
|
+
* `suggestion` when a cheaper model fits and the saving is at least 10% and $0.05 per hour. `insufficient_data` until the instance has at least 30 samples over at least an hour. `no_cheaper_fit` otherwise.
|
|
23
|
+
*
|
|
24
|
+
* @type {GpuSuggestionStatusEnum}
|
|
25
|
+
* @memberof GpuSuggestion
|
|
26
|
+
*/
|
|
27
|
+
status: GpuSuggestionStatusEnum;
|
|
28
|
+
/**
|
|
29
|
+
* Highest GPU memory seen, in MiB. Null with no telemetry.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof GpuSuggestion
|
|
32
|
+
*/
|
|
33
|
+
peakUsedMb: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* The peak plus headroom (25% and 1024 MiB), in MiB: the memory a suggested model must have. Null until there is enough telemetry.
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof GpuSuggestion
|
|
39
|
+
*/
|
|
40
|
+
requiredMb: number | null;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof GpuSuggestion
|
|
45
|
+
*/
|
|
46
|
+
samples: number;
|
|
47
|
+
/**
|
|
48
|
+
* Minutes between the first and the latest telemetry sample.
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof GpuSuggestion
|
|
51
|
+
*/
|
|
52
|
+
observedMinutes: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {GpuSuggestionGpu}
|
|
56
|
+
* @memberof GpuSuggestion
|
|
57
|
+
*/
|
|
58
|
+
current: GpuSuggestionGpu;
|
|
59
|
+
/**
|
|
60
|
+
* Set only when status is `suggestion`.
|
|
61
|
+
* @type {GpuSuggestionCheaper}
|
|
62
|
+
* @memberof GpuSuggestion
|
|
63
|
+
*/
|
|
64
|
+
suggestion: GpuSuggestionCheaper | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @export
|
|
68
|
+
*/
|
|
69
|
+
export declare const GpuSuggestionStatusEnum: {
|
|
70
|
+
readonly Suggestion: "suggestion";
|
|
71
|
+
readonly InsufficientData: "insufficient_data";
|
|
72
|
+
readonly NoCheaperFit: "no_cheaper_fit";
|
|
73
|
+
};
|
|
74
|
+
export type GpuSuggestionStatusEnum = typeof GpuSuggestionStatusEnum[keyof typeof GpuSuggestionStatusEnum];
|
|
75
|
+
/**
|
|
76
|
+
* Check if a given object implements the GpuSuggestion interface.
|
|
77
|
+
*/
|
|
78
|
+
export declare function instanceOfGpuSuggestion(value: object): value is GpuSuggestion;
|
|
79
|
+
export declare function GpuSuggestionFromJSON(json: any): GpuSuggestion;
|
|
80
|
+
export declare function GpuSuggestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestion;
|
|
81
|
+
export declare function GpuSuggestionToJSON(json: any): GpuSuggestion;
|
|
82
|
+
export declare function GpuSuggestionToJSONTyped(value?: GpuSuggestion | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,85 @@
|
|
|
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.GpuSuggestionStatusEnum = void 0;
|
|
17
|
+
exports.instanceOfGpuSuggestion = instanceOfGpuSuggestion;
|
|
18
|
+
exports.GpuSuggestionFromJSON = GpuSuggestionFromJSON;
|
|
19
|
+
exports.GpuSuggestionFromJSONTyped = GpuSuggestionFromJSONTyped;
|
|
20
|
+
exports.GpuSuggestionToJSON = GpuSuggestionToJSON;
|
|
21
|
+
exports.GpuSuggestionToJSONTyped = GpuSuggestionToJSONTyped;
|
|
22
|
+
const GpuSuggestionCheaper_1 = require("./GpuSuggestionCheaper");
|
|
23
|
+
const GpuSuggestionGpu_1 = require("./GpuSuggestionGpu");
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
exports.GpuSuggestionStatusEnum = {
|
|
28
|
+
Suggestion: 'suggestion',
|
|
29
|
+
InsufficientData: 'insufficient_data',
|
|
30
|
+
NoCheaperFit: 'no_cheaper_fit'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the GpuSuggestion interface.
|
|
34
|
+
*/
|
|
35
|
+
function instanceOfGpuSuggestion(value) {
|
|
36
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if ((!('peakUsedMb' in value) && !('peak_used_mb' in value)) || (value['peakUsedMb'] === undefined && value['peak_used_mb'] === undefined))
|
|
39
|
+
return false;
|
|
40
|
+
if ((!('requiredMb' in value) && !('required_mb' in value)) || (value['requiredMb'] === undefined && value['required_mb'] === undefined))
|
|
41
|
+
return false;
|
|
42
|
+
if (!('samples' in value) || value['samples'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if ((!('observedMinutes' in value) && !('observed_minutes' in value)) || (value['observedMinutes'] === undefined && value['observed_minutes'] === undefined))
|
|
45
|
+
return false;
|
|
46
|
+
if (!('current' in value) || value['current'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('suggestion' in value) || value['suggestion'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
function GpuSuggestionFromJSON(json) {
|
|
53
|
+
return GpuSuggestionFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function GpuSuggestionFromJSONTyped(json, ignoreDiscriminator) {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'status': json['status'],
|
|
61
|
+
'peakUsedMb': json['peak_used_mb'],
|
|
62
|
+
'requiredMb': json['required_mb'],
|
|
63
|
+
'samples': json['samples'],
|
|
64
|
+
'observedMinutes': json['observed_minutes'],
|
|
65
|
+
'current': (0, GpuSuggestionGpu_1.GpuSuggestionGpuFromJSON)(json['current']),
|
|
66
|
+
'suggestion': (0, GpuSuggestionCheaper_1.GpuSuggestionCheaperFromJSON)(json['suggestion']),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function GpuSuggestionToJSON(json) {
|
|
70
|
+
return GpuSuggestionToJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
function GpuSuggestionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
'status': value['status'],
|
|
78
|
+
'peak_used_mb': value['peakUsedMb'],
|
|
79
|
+
'required_mb': value['requiredMb'],
|
|
80
|
+
'samples': value['samples'],
|
|
81
|
+
'observed_minutes': value['observedMinutes'],
|
|
82
|
+
'current': (0, GpuSuggestionGpu_1.GpuSuggestionGpuToJSON)(value['current']),
|
|
83
|
+
'suggestion': (0, GpuSuggestionCheaper_1.GpuSuggestionCheaperToJSON)(value['suggestion']),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
* The suggested GPU model and what it would save.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GpuSuggestionCheaper
|
|
16
|
+
*/
|
|
17
|
+
export interface GpuSuggestionCheaper {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GpuSuggestionCheaper
|
|
22
|
+
*/
|
|
23
|
+
gpuType: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof GpuSuggestionCheaper
|
|
28
|
+
*/
|
|
29
|
+
gpuName: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GpuSuggestionCheaper
|
|
34
|
+
*/
|
|
35
|
+
vramGb: number;
|
|
36
|
+
/**
|
|
37
|
+
* The cheapest current listing for this model, per hour.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof GpuSuggestionCheaper
|
|
40
|
+
*/
|
|
41
|
+
pricePerHour: number;
|
|
42
|
+
/**
|
|
43
|
+
* The instance's hourly price minus this model's.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GpuSuggestionCheaper
|
|
46
|
+
*/
|
|
47
|
+
savingPerHour: number;
|
|
48
|
+
/**
|
|
49
|
+
* The saving as a percentage of the instance's hourly price.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof GpuSuggestionCheaper
|
|
52
|
+
*/
|
|
53
|
+
savingPct: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the GpuSuggestionCheaper interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfGpuSuggestionCheaper(value: object): value is GpuSuggestionCheaper;
|
|
59
|
+
export declare function GpuSuggestionCheaperFromJSON(json: any): GpuSuggestionCheaper;
|
|
60
|
+
export declare function GpuSuggestionCheaperFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestionCheaper;
|
|
61
|
+
export declare function GpuSuggestionCheaperToJSON(json: any): GpuSuggestionCheaper;
|
|
62
|
+
export declare function GpuSuggestionCheaperToJSONTyped(value?: GpuSuggestionCheaper | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
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.instanceOfGpuSuggestionCheaper = instanceOfGpuSuggestionCheaper;
|
|
17
|
+
exports.GpuSuggestionCheaperFromJSON = GpuSuggestionCheaperFromJSON;
|
|
18
|
+
exports.GpuSuggestionCheaperFromJSONTyped = GpuSuggestionCheaperFromJSONTyped;
|
|
19
|
+
exports.GpuSuggestionCheaperToJSON = GpuSuggestionCheaperToJSON;
|
|
20
|
+
exports.GpuSuggestionCheaperToJSONTyped = GpuSuggestionCheaperToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the GpuSuggestionCheaper interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfGpuSuggestionCheaper(value) {
|
|
25
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('gpuName' in value) && !('gpu_name' in value)) || (value['gpuName'] === undefined && value['gpu_name'] === undefined))
|
|
28
|
+
return false;
|
|
29
|
+
if ((!('vramGb' in value) && !('vram_gb' in value)) || (value['vramGb'] === undefined && value['vram_gb'] === undefined))
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('pricePerHour' in value) && !('price_per_hour' in value)) || (value['pricePerHour'] === undefined && value['price_per_hour'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
if ((!('savingPerHour' in value) && !('saving_per_hour' in value)) || (value['savingPerHour'] === undefined && value['saving_per_hour'] === undefined))
|
|
34
|
+
return false;
|
|
35
|
+
if ((!('savingPct' in value) && !('saving_pct' in value)) || (value['savingPct'] === undefined && value['saving_pct'] === undefined))
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function GpuSuggestionCheaperFromJSON(json) {
|
|
40
|
+
return GpuSuggestionCheaperFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function GpuSuggestionCheaperFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'gpuType': json['gpu_type'],
|
|
48
|
+
'gpuName': json['gpu_name'],
|
|
49
|
+
'vramGb': json['vram_gb'],
|
|
50
|
+
'pricePerHour': json['price_per_hour'],
|
|
51
|
+
'savingPerHour': json['saving_per_hour'],
|
|
52
|
+
'savingPct': json['saving_pct'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function GpuSuggestionCheaperToJSON(json) {
|
|
56
|
+
return GpuSuggestionCheaperToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function GpuSuggestionCheaperToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'gpu_type': value['gpuType'],
|
|
64
|
+
'gpu_name': value['gpuName'],
|
|
65
|
+
'vram_gb': value['vramGb'],
|
|
66
|
+
'price_per_hour': value['pricePerHour'],
|
|
67
|
+
'saving_per_hour': value['savingPerHour'],
|
|
68
|
+
'saving_pct': value['savingPct'],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -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
|
+
* A GPU model at an hourly price.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GpuSuggestionGpu
|
|
16
|
+
*/
|
|
17
|
+
export interface GpuSuggestionGpu {
|
|
18
|
+
/**
|
|
19
|
+
* The GPU model id, as in GET /v1/gpu-types.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GpuSuggestionGpu
|
|
22
|
+
*/
|
|
23
|
+
gpuType: string;
|
|
24
|
+
/**
|
|
25
|
+
* The GPU model's display name.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof GpuSuggestionGpu
|
|
28
|
+
*/
|
|
29
|
+
gpuName: string;
|
|
30
|
+
/**
|
|
31
|
+
* Memory per GPU, in GB.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GpuSuggestionGpu
|
|
34
|
+
*/
|
|
35
|
+
vramGb: number;
|
|
36
|
+
/**
|
|
37
|
+
* Hourly price for the same number of GPUs as the instance.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof GpuSuggestionGpu
|
|
40
|
+
*/
|
|
41
|
+
pricePerHour: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the GpuSuggestionGpu interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfGpuSuggestionGpu(value: object): value is GpuSuggestionGpu;
|
|
47
|
+
export declare function GpuSuggestionGpuFromJSON(json: any): GpuSuggestionGpu;
|
|
48
|
+
export declare function GpuSuggestionGpuFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestionGpu;
|
|
49
|
+
export declare function GpuSuggestionGpuToJSON(json: any): GpuSuggestionGpu;
|
|
50
|
+
export declare function GpuSuggestionGpuToJSONTyped(value?: GpuSuggestionGpu | null, ignoreDiscriminator?: boolean): any;
|