@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.
Files changed (218) hide show
  1. package/.openapi-generator/FILES +56 -0
  2. package/README.md +50 -2
  3. package/dist/apis/BillingApi.d.ts +2 -2
  4. package/dist/apis/BillingApi.js +2 -2
  5. package/dist/apis/EndpointsApi.d.ts +150 -0
  6. package/dist/apis/EndpointsApi.js +379 -0
  7. package/dist/apis/InstancesApi.d.ts +15 -0
  8. package/dist/apis/InstancesApi.js +45 -0
  9. package/dist/apis/JobsApi.d.ts +172 -0
  10. package/dist/apis/JobsApi.js +444 -0
  11. package/dist/apis/OperationsApi.d.ts +17 -0
  12. package/dist/apis/OperationsApi.js +48 -0
  13. package/dist/apis/SecretsApi.d.ts +123 -0
  14. package/dist/apis/SecretsApi.js +328 -0
  15. package/dist/apis/index.d.ts +3 -0
  16. package/dist/apis/index.js +3 -0
  17. package/dist/esm/apis/BillingApi.d.ts +2 -2
  18. package/dist/esm/apis/BillingApi.js +2 -2
  19. package/dist/esm/apis/EndpointsApi.d.ts +150 -0
  20. package/dist/esm/apis/EndpointsApi.js +375 -0
  21. package/dist/esm/apis/InstancesApi.d.ts +15 -0
  22. package/dist/esm/apis/InstancesApi.js +45 -0
  23. package/dist/esm/apis/JobsApi.d.ts +172 -0
  24. package/dist/esm/apis/JobsApi.js +440 -0
  25. package/dist/esm/apis/OperationsApi.d.ts +17 -0
  26. package/dist/esm/apis/OperationsApi.js +48 -0
  27. package/dist/esm/apis/SecretsApi.d.ts +123 -0
  28. package/dist/esm/apis/SecretsApi.js +324 -0
  29. package/dist/esm/apis/index.d.ts +3 -0
  30. package/dist/esm/apis/index.js +3 -0
  31. package/dist/esm/models/Balance.d.ts +6 -0
  32. package/dist/esm/models/Balance.js +2 -0
  33. package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +3 -0
  34. package/dist/esm/models/CreateWebhookEndpointRequest.js +4 -1
  35. package/dist/esm/models/DedicatedIPOffer.d.ts +98 -0
  36. package/dist/esm/models/DedicatedIPOffer.js +87 -0
  37. package/dist/esm/models/Endpoint.d.ts +147 -0
  38. package/dist/esm/models/Endpoint.js +121 -0
  39. package/dist/esm/models/EndpointCreate.d.ts +80 -0
  40. package/dist/esm/models/EndpointCreate.js +63 -0
  41. package/dist/esm/models/EndpointList.d.ts +33 -0
  42. package/dist/esm/models/EndpointList.js +44 -0
  43. package/dist/esm/models/EndpointMachine.d.ts +90 -0
  44. package/dist/esm/models/EndpointMachine.js +84 -0
  45. package/dist/esm/models/EndpointReplicaCounts.d.ts +38 -0
  46. package/dist/esm/models/EndpointReplicaCounts.js +47 -0
  47. package/dist/esm/models/Job.d.ts +352 -0
  48. package/dist/esm/models/Job.js +254 -0
  49. package/dist/esm/models/JobAttempt.d.ts +176 -0
  50. package/dist/esm/models/JobAttempt.js +147 -0
  51. package/dist/esm/models/JobCreate.d.ts +153 -0
  52. package/dist/esm/models/JobCreate.js +84 -0
  53. package/dist/esm/models/JobGpuTypes.d.ts +39 -0
  54. package/dist/esm/models/JobGpuTypes.js +48 -0
  55. package/dist/esm/models/JobGpuTypesDataInner.d.ts +58 -0
  56. package/dist/esm/models/JobGpuTypesDataInner.js +59 -0
  57. package/dist/esm/models/JobLogChunk.d.ts +50 -0
  58. package/dist/esm/models/JobLogChunk.js +55 -0
  59. package/dist/esm/models/JobLogs.d.ts +39 -0
  60. package/dist/esm/models/JobLogs.js +48 -0
  61. package/dist/esm/models/JobPage.d.ts +39 -0
  62. package/dist/esm/models/JobPage.js +48 -0
  63. package/dist/esm/models/JobSharingHint.d.ts +46 -0
  64. package/dist/esm/models/JobSharingHint.js +51 -0
  65. package/dist/esm/models/JobTelemetry.d.ts +51 -0
  66. package/dist/esm/models/JobTelemetry.js +56 -0
  67. package/dist/esm/models/JobTelemetryPoint.d.ts +56 -0
  68. package/dist/esm/models/JobTelemetryPoint.js +59 -0
  69. package/dist/esm/models/JobTrial.d.ts +79 -0
  70. package/dist/esm/models/JobTrial.js +73 -0
  71. package/dist/esm/models/Secret.d.ts +62 -0
  72. package/dist/esm/models/Secret.js +63 -0
  73. package/dist/esm/models/SecretCreate.d.ts +44 -0
  74. package/dist/esm/models/SecretCreate.js +49 -0
  75. package/dist/esm/models/SecretImportItem.d.ts +38 -0
  76. package/dist/esm/models/SecretImportItem.js +47 -0
  77. package/dist/esm/models/SecretImportRequest.d.ts +39 -0
  78. package/dist/esm/models/SecretImportRequest.js +46 -0
  79. package/dist/esm/models/SecretImportResult.d.ts +44 -0
  80. package/dist/esm/models/SecretImportResult.js +51 -0
  81. package/dist/esm/models/SecretList.d.ts +33 -0
  82. package/dist/esm/models/SecretList.js +44 -0
  83. package/dist/esm/models/SecretPut.d.ts +38 -0
  84. package/dist/esm/models/SecretPut.js +45 -0
  85. package/dist/esm/models/WebhookEndpoint.d.ts +3 -0
  86. package/dist/esm/models/WebhookEndpoint.js +4 -1
  87. package/dist/esm/models/index.d.ts +25 -0
  88. package/dist/esm/models/index.js +25 -0
  89. package/dist/esm/runtime.js +1 -1
  90. package/dist/models/Balance.d.ts +6 -0
  91. package/dist/models/Balance.js +2 -0
  92. package/dist/models/CreateWebhookEndpointRequest.d.ts +3 -0
  93. package/dist/models/CreateWebhookEndpointRequest.js +4 -1
  94. package/dist/models/DedicatedIPOffer.d.ts +98 -0
  95. package/dist/models/DedicatedIPOffer.js +94 -0
  96. package/dist/models/Endpoint.d.ts +147 -0
  97. package/dist/models/Endpoint.js +129 -0
  98. package/dist/models/EndpointCreate.d.ts +80 -0
  99. package/dist/models/EndpointCreate.js +70 -0
  100. package/dist/models/EndpointList.d.ts +33 -0
  101. package/dist/models/EndpointList.js +51 -0
  102. package/dist/models/EndpointMachine.d.ts +90 -0
  103. package/dist/models/EndpointMachine.js +92 -0
  104. package/dist/models/EndpointReplicaCounts.d.ts +38 -0
  105. package/dist/models/EndpointReplicaCounts.js +54 -0
  106. package/dist/models/Job.d.ts +352 -0
  107. package/dist/models/Job.js +262 -0
  108. package/dist/models/JobAttempt.d.ts +176 -0
  109. package/dist/models/JobAttempt.js +155 -0
  110. package/dist/models/JobCreate.d.ts +153 -0
  111. package/dist/models/JobCreate.js +92 -0
  112. package/dist/models/JobGpuTypes.d.ts +39 -0
  113. package/dist/models/JobGpuTypes.js +55 -0
  114. package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
  115. package/dist/models/JobGpuTypesDataInner.js +66 -0
  116. package/dist/models/JobLogChunk.d.ts +50 -0
  117. package/dist/models/JobLogChunk.js +62 -0
  118. package/dist/models/JobLogs.d.ts +39 -0
  119. package/dist/models/JobLogs.js +55 -0
  120. package/dist/models/JobPage.d.ts +39 -0
  121. package/dist/models/JobPage.js +55 -0
  122. package/dist/models/JobSharingHint.d.ts +46 -0
  123. package/dist/models/JobSharingHint.js +58 -0
  124. package/dist/models/JobTelemetry.d.ts +51 -0
  125. package/dist/models/JobTelemetry.js +63 -0
  126. package/dist/models/JobTelemetryPoint.d.ts +56 -0
  127. package/dist/models/JobTelemetryPoint.js +66 -0
  128. package/dist/models/JobTrial.d.ts +79 -0
  129. package/dist/models/JobTrial.js +81 -0
  130. package/dist/models/Secret.d.ts +62 -0
  131. package/dist/models/Secret.js +70 -0
  132. package/dist/models/SecretCreate.d.ts +44 -0
  133. package/dist/models/SecretCreate.js +56 -0
  134. package/dist/models/SecretImportItem.d.ts +38 -0
  135. package/dist/models/SecretImportItem.js +54 -0
  136. package/dist/models/SecretImportRequest.d.ts +39 -0
  137. package/dist/models/SecretImportRequest.js +53 -0
  138. package/dist/models/SecretImportResult.d.ts +44 -0
  139. package/dist/models/SecretImportResult.js +58 -0
  140. package/dist/models/SecretList.d.ts +33 -0
  141. package/dist/models/SecretList.js +51 -0
  142. package/dist/models/SecretPut.d.ts +38 -0
  143. package/dist/models/SecretPut.js +52 -0
  144. package/dist/models/WebhookEndpoint.d.ts +3 -0
  145. package/dist/models/WebhookEndpoint.js +4 -1
  146. package/dist/models/index.d.ts +25 -0
  147. package/dist/models/index.js +25 -0
  148. package/dist/runtime.js +1 -1
  149. package/docs/Balance.md +2 -0
  150. package/docs/BillingApi.md +2 -2
  151. package/docs/DedicatedIPOffer.md +56 -0
  152. package/docs/Endpoint.md +68 -0
  153. package/docs/EndpointCreate.md +50 -0
  154. package/docs/EndpointList.md +34 -0
  155. package/docs/EndpointMachine.md +50 -0
  156. package/docs/EndpointReplicaCounts.md +36 -0
  157. package/docs/EndpointsApi.md +544 -0
  158. package/docs/InstancesApi.md +68 -1
  159. package/docs/Job.md +125 -0
  160. package/docs/JobAttempt.md +69 -0
  161. package/docs/JobCreate.md +66 -0
  162. package/docs/JobGpuTypes.md +36 -0
  163. package/docs/JobGpuTypesDataInner.md +42 -0
  164. package/docs/JobLogChunk.md +40 -0
  165. package/docs/JobLogs.md +36 -0
  166. package/docs/JobPage.md +36 -0
  167. package/docs/JobSharingHint.md +39 -0
  168. package/docs/JobTelemetry.md +40 -0
  169. package/docs/JobTelemetryPoint.md +42 -0
  170. package/docs/JobTrial.md +46 -0
  171. package/docs/JobsApi.md +609 -0
  172. package/docs/OperationsApi.md +76 -0
  173. package/docs/Secret.md +45 -0
  174. package/docs/SecretCreate.md +38 -0
  175. package/docs/SecretImportItem.md +36 -0
  176. package/docs/SecretImportRequest.md +36 -0
  177. package/docs/SecretImportResult.md +38 -0
  178. package/docs/SecretList.md +34 -0
  179. package/docs/SecretPut.md +36 -0
  180. package/docs/SecretsApi.md +450 -0
  181. package/package.json +1 -1
  182. package/src/apis/BillingApi.ts +2 -2
  183. package/src/apis/EndpointsApi.ts +481 -0
  184. package/src/apis/InstancesApi.ts +52 -0
  185. package/src/apis/JobsApi.ts +551 -0
  186. package/src/apis/OperationsApi.ts +59 -0
  187. package/src/apis/SecretsApi.ts +413 -0
  188. package/src/apis/index.ts +3 -0
  189. package/src/models/Balance.ts +8 -0
  190. package/src/models/CreateWebhookEndpointRequest.ts +4 -1
  191. package/src/models/DedicatedIPOffer.ts +165 -0
  192. package/src/models/Endpoint.ts +247 -0
  193. package/src/models/EndpointCreate.ts +132 -0
  194. package/src/models/EndpointList.ts +74 -0
  195. package/src/models/EndpointMachine.ts +151 -0
  196. package/src/models/EndpointReplicaCounts.ts +75 -0
  197. package/src/models/Job.ts +538 -0
  198. package/src/models/JobAttempt.ts +267 -0
  199. package/src/models/JobCreate.ts +221 -0
  200. package/src/models/JobGpuTypes.ts +83 -0
  201. package/src/models/JobGpuTypesDataInner.ts +104 -0
  202. package/src/models/JobLogChunk.ts +93 -0
  203. package/src/models/JobLogs.ts +83 -0
  204. package/src/models/JobPage.ts +83 -0
  205. package/src/models/JobSharingHint.ts +86 -0
  206. package/src/models/JobTelemetry.ts +101 -0
  207. package/src/models/JobTelemetryPoint.ts +102 -0
  208. package/src/models/JobTrial.ts +132 -0
  209. package/src/models/Secret.ts +111 -0
  210. package/src/models/SecretCreate.ts +83 -0
  211. package/src/models/SecretImportItem.ts +75 -0
  212. package/src/models/SecretImportRequest.ts +82 -0
  213. package/src/models/SecretImportResult.ts +84 -0
  214. package/src/models/SecretList.ts +74 -0
  215. package/src/models/SecretPut.ts +74 -0
  216. package/src/models/WebhookEndpoint.ts +4 -1
  217. package/src/models/index.ts +25 -0
  218. package/src/runtime.ts +1 -1
@@ -0,0 +1,93 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface JobLogChunk
20
+ */
21
+ export interface JobLogChunk {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof JobLogChunk
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof JobLogChunk
32
+ */
33
+ attempt: number;
34
+ /**
35
+ * A piece of the job's combined output, at most 16 KB.
36
+ * @type {string}
37
+ * @memberof JobLogChunk
38
+ */
39
+ text: string;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof JobLogChunk
44
+ */
45
+ createdAt: Date;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the JobLogChunk interface.
50
+ */
51
+ export function instanceOfJobLogChunk(value: object): value is JobLogChunk {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('attempt' in value) || value['attempt'] === undefined) return false;
54
+ if (!('text' in value) || value['text'] === undefined) return false;
55
+ if ((!('createdAt' in (value as Record<string, any>)) && !('created_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['createdAt'] === undefined && (value as Record<string, any>)['created_at'] === undefined)) return false;
56
+ return true;
57
+ }
58
+
59
+ export function JobLogChunkFromJSON(json: any): JobLogChunk {
60
+ return JobLogChunkFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function JobLogChunkFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobLogChunk {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'id': json['id'],
70
+ 'attempt': json['attempt'],
71
+ 'text': json['text'],
72
+ 'createdAt': (new Date(json['created_at'])),
73
+ };
74
+ }
75
+
76
+ export function JobLogChunkToJSON(json: any): JobLogChunk {
77
+ return JobLogChunkToJSONTyped(json, false);
78
+ }
79
+
80
+ export function JobLogChunkToJSONTyped(value?: JobLogChunk | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'id': value['id'],
88
+ 'attempt': value['attempt'],
89
+ 'text': value['text'],
90
+ 'created_at': value['createdAt'].toISOString(),
91
+ };
92
+ }
93
+
@@ -0,0 +1,83 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { JobLogChunk } from './JobLogChunk';
17
+ import {
18
+ JobLogChunkFromJSON,
19
+ JobLogChunkFromJSONTyped,
20
+ JobLogChunkToJSON,
21
+ JobLogChunkToJSONTyped,
22
+ } from './JobLogChunk';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface JobLogs
28
+ */
29
+ export interface JobLogs {
30
+ /**
31
+ *
32
+ * @type {Array<JobLogChunk>}
33
+ * @memberof JobLogs
34
+ */
35
+ data: Array<JobLogChunk>;
36
+ /**
37
+ * Pass this as `after` to read on from here.
38
+ * @type {number}
39
+ * @memberof JobLogs
40
+ */
41
+ nextAfter: number;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the JobLogs interface.
46
+ */
47
+ export function instanceOfJobLogs(value: object): value is JobLogs {
48
+ if (!('data' in value) || value['data'] === undefined) return false;
49
+ if ((!('nextAfter' in (value as Record<string, any>)) && !('next_after' in (value as Record<string, any>))) || ((value as Record<string, any>)['nextAfter'] === undefined && (value as Record<string, any>)['next_after'] === undefined)) return false;
50
+ return true;
51
+ }
52
+
53
+ export function JobLogsFromJSON(json: any): JobLogs {
54
+ return JobLogsFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function JobLogsFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobLogs {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'data': ((json['data'] as Array<any>).map(JobLogChunkFromJSON)),
64
+ 'nextAfter': json['next_after'],
65
+ };
66
+ }
67
+
68
+ export function JobLogsToJSON(json: any): JobLogs {
69
+ return JobLogsToJSONTyped(json, false);
70
+ }
71
+
72
+ export function JobLogsToJSONTyped(value?: JobLogs | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'data': ((value['data'] as Array<any>).map(JobLogChunkToJSON)),
80
+ 'next_after': value['nextAfter'],
81
+ };
82
+ }
83
+
@@ -0,0 +1,83 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { Job } from './Job';
17
+ import {
18
+ JobFromJSON,
19
+ JobFromJSONTyped,
20
+ JobToJSON,
21
+ JobToJSONTyped,
22
+ } from './Job';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface JobPage
28
+ */
29
+ export interface JobPage {
30
+ /**
31
+ *
32
+ * @type {Array<Job>}
33
+ * @memberof JobPage
34
+ */
35
+ data: Array<Job>;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof JobPage
40
+ */
41
+ nextCursor: string | null;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the JobPage interface.
46
+ */
47
+ export function instanceOfJobPage(value: object): value is JobPage {
48
+ if (!('data' in value) || value['data'] === undefined) return false;
49
+ if ((!('nextCursor' in (value as Record<string, any>)) && !('next_cursor' in (value as Record<string, any>))) || ((value as Record<string, any>)['nextCursor'] === undefined && (value as Record<string, any>)['next_cursor'] === undefined)) return false;
50
+ return true;
51
+ }
52
+
53
+ export function JobPageFromJSON(json: any): JobPage {
54
+ return JobPageFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function JobPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobPage {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'data': ((json['data'] as Array<any>).map(JobFromJSON)),
64
+ 'nextCursor': json['next_cursor'],
65
+ };
66
+ }
67
+
68
+ export function JobPageToJSON(json: any): JobPage {
69
+ return JobPageToJSONTyped(json, false);
70
+ }
71
+
72
+ export function JobPageToJSONTyped(value?: JobPage | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'data': ((value['data'] as Array<any>).map(JobToJSON)),
80
+ 'next_cursor': value['nextCursor'],
81
+ };
82
+ }
83
+
@@ -0,0 +1,86 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Advisory only, and present only when it applies. A job carries it when it succeeded with a whole GPU it did not allow to be shared, ran at least a minute with no out-of-memory exit or eviction, and its peak GPU memory, measured from per-process accounting (`memory_source` `process`), was at most half of the GPU's memory. Sharing stays opt-in; the hint never changes how a job is placed.
18
+ *
19
+ * @export
20
+ * @interface JobSharingHint
21
+ */
22
+ export interface JobSharingHint {
23
+ /**
24
+ * A short sentence to show the user, such as "This job used 5.1 GB of its 48 GB GPU. Set allow_sharing and allow_restart to true to let it share a GPU with your other jobs and pay only for its share." It names only the flags the job did not already set.
25
+ *
26
+ * @type {string}
27
+ * @memberof JobSharingHint
28
+ */
29
+ message: string;
30
+ /**
31
+ * The job's measured peak GPU memory, in MiB.
32
+ * @type {number}
33
+ * @memberof JobSharingHint
34
+ */
35
+ peakMemoryMb: number;
36
+ /**
37
+ * Total memory of the GPU the job held, in MiB.
38
+ * @type {number}
39
+ * @memberof JobSharingHint
40
+ */
41
+ gpuMemoryTotalMb: number;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the JobSharingHint interface.
46
+ */
47
+ export function instanceOfJobSharingHint(value: object): value is JobSharingHint {
48
+ if (!('message' in value) || value['message'] === undefined) return false;
49
+ if ((!('peakMemoryMb' in (value as Record<string, any>)) && !('peak_memory_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['peakMemoryMb'] === undefined && (value as Record<string, any>)['peak_memory_mb'] === undefined)) return false;
50
+ if ((!('gpuMemoryTotalMb' in (value as Record<string, any>)) && !('gpu_memory_total_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuMemoryTotalMb'] === undefined && (value as Record<string, any>)['gpu_memory_total_mb'] === undefined)) return false;
51
+ return true;
52
+ }
53
+
54
+ export function JobSharingHintFromJSON(json: any): JobSharingHint {
55
+ return JobSharingHintFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function JobSharingHintFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobSharingHint {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'message': json['message'],
65
+ 'peakMemoryMb': json['peak_memory_mb'],
66
+ 'gpuMemoryTotalMb': json['gpu_memory_total_mb'],
67
+ };
68
+ }
69
+
70
+ export function JobSharingHintToJSON(json: any): JobSharingHint {
71
+ return JobSharingHintToJSONTyped(json, false);
72
+ }
73
+
74
+ export function JobSharingHintToJSONTyped(value?: JobSharingHint | null, ignoreDiscriminator: boolean = false): any {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+
79
+ return {
80
+
81
+ 'message': value['message'],
82
+ 'peak_memory_mb': value['peakMemoryMb'],
83
+ 'gpu_memory_total_mb': value['gpuMemoryTotalMb'],
84
+ };
85
+ }
86
+
@@ -0,0 +1,101 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { JobTelemetryPoint } from './JobTelemetryPoint';
17
+ import {
18
+ JobTelemetryPointFromJSON,
19
+ JobTelemetryPointFromJSONTyped,
20
+ JobTelemetryPointToJSON,
21
+ JobTelemetryPointToJSONTyped,
22
+ } from './JobTelemetryPoint';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface JobTelemetry
28
+ */
29
+ export interface JobTelemetry {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof JobTelemetry
34
+ */
35
+ peakMemoryMb: number | null;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof JobTelemetry
40
+ */
41
+ reservationMb: number | null;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof JobTelemetry
46
+ */
47
+ gpuMemoryTotalMb: number | null;
48
+ /**
49
+ *
50
+ * @type {Array<JobTelemetryPoint>}
51
+ * @memberof JobTelemetry
52
+ */
53
+ points: Array<JobTelemetryPoint>;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the JobTelemetry interface.
58
+ */
59
+ export function instanceOfJobTelemetry(value: object): value is JobTelemetry {
60
+ if ((!('peakMemoryMb' in (value as Record<string, any>)) && !('peak_memory_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['peakMemoryMb'] === undefined && (value as Record<string, any>)['peak_memory_mb'] === undefined)) return false;
61
+ if ((!('reservationMb' in (value as Record<string, any>)) && !('reservation_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['reservationMb'] === undefined && (value as Record<string, any>)['reservation_mb'] === undefined)) return false;
62
+ if ((!('gpuMemoryTotalMb' in (value as Record<string, any>)) && !('gpu_memory_total_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuMemoryTotalMb'] === undefined && (value as Record<string, any>)['gpu_memory_total_mb'] === undefined)) return false;
63
+ if (!('points' in value) || value['points'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function JobTelemetryFromJSON(json: any): JobTelemetry {
68
+ return JobTelemetryFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function JobTelemetryFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobTelemetry {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'peakMemoryMb': json['peak_memory_mb'],
78
+ 'reservationMb': json['reservation_mb'],
79
+ 'gpuMemoryTotalMb': json['gpu_memory_total_mb'],
80
+ 'points': ((json['points'] as Array<any>).map(JobTelemetryPointFromJSON)),
81
+ };
82
+ }
83
+
84
+ export function JobTelemetryToJSON(json: any): JobTelemetry {
85
+ return JobTelemetryToJSONTyped(json, false);
86
+ }
87
+
88
+ export function JobTelemetryToJSONTyped(value?: JobTelemetry | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'peak_memory_mb': value['peakMemoryMb'],
96
+ 'reservation_mb': value['reservationMb'],
97
+ 'gpu_memory_total_mb': value['gpuMemoryTotalMb'],
98
+ 'points': ((value['points'] as Array<any>).map(JobTelemetryPointToJSON)),
99
+ };
100
+ }
101
+
@@ -0,0 +1,102 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface JobTelemetryPoint
20
+ */
21
+ export interface JobTelemetryPoint {
22
+ /**
23
+ *
24
+ * @type {Date}
25
+ * @memberof JobTelemetryPoint
26
+ */
27
+ ts: Date;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof JobTelemetryPoint
32
+ */
33
+ attempt: number;
34
+ /**
35
+ * The job's highest GPU memory use in the window, in MiB.
36
+ * @type {number}
37
+ * @memberof JobTelemetryPoint
38
+ */
39
+ memoryMb: number;
40
+ /**
41
+ * Memory in use on the whole GPU, all jobs included, in MiB.
42
+ * @type {number}
43
+ * @memberof JobTelemetryPoint
44
+ */
45
+ gpuMemoryMb: number | null;
46
+ /**
47
+ * Utilization of the whole GPU, in percent.
48
+ * @type {number}
49
+ * @memberof JobTelemetryPoint
50
+ */
51
+ gpuUtilPct: number | null;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the JobTelemetryPoint interface.
56
+ */
57
+ export function instanceOfJobTelemetryPoint(value: object): value is JobTelemetryPoint {
58
+ if (!('ts' in value) || value['ts'] === undefined) return false;
59
+ if (!('attempt' in value) || value['attempt'] === undefined) return false;
60
+ if ((!('memoryMb' in (value as Record<string, any>)) && !('memory_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['memoryMb'] === undefined && (value as Record<string, any>)['memory_mb'] === undefined)) return false;
61
+ if ((!('gpuMemoryMb' in (value as Record<string, any>)) && !('gpu_memory_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuMemoryMb'] === undefined && (value as Record<string, any>)['gpu_memory_mb'] === undefined)) return false;
62
+ if ((!('gpuUtilPct' in (value as Record<string, any>)) && !('gpu_util_pct' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuUtilPct'] === undefined && (value as Record<string, any>)['gpu_util_pct'] === undefined)) return false;
63
+ return true;
64
+ }
65
+
66
+ export function JobTelemetryPointFromJSON(json: any): JobTelemetryPoint {
67
+ return JobTelemetryPointFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function JobTelemetryPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobTelemetryPoint {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'ts': (new Date(json['ts'])),
77
+ 'attempt': json['attempt'],
78
+ 'memoryMb': json['memory_mb'],
79
+ 'gpuMemoryMb': json['gpu_memory_mb'],
80
+ 'gpuUtilPct': json['gpu_util_pct'],
81
+ };
82
+ }
83
+
84
+ export function JobTelemetryPointToJSON(json: any): JobTelemetryPoint {
85
+ return JobTelemetryPointToJSONTyped(json, false);
86
+ }
87
+
88
+ export function JobTelemetryPointToJSONTyped(value?: JobTelemetryPoint | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'ts': value['ts'].toISOString(),
96
+ 'attempt': value['attempt'],
97
+ 'memory_mb': value['memoryMb'],
98
+ 'gpu_memory_mb': value['gpuMemoryMb'],
99
+ 'gpu_util_pct': value['gpuUtilPct'],
100
+ };
101
+ }
102
+
@@ -0,0 +1,132 @@
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
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface JobTrial
20
+ */
21
+ export interface JobTrial {
22
+ /**
23
+ * False when this deployment runs no trial. Every other field is then zero.
24
+ * @type {boolean}
25
+ * @memberof JobTrial
26
+ */
27
+ enabled: boolean;
28
+ /**
29
+ * True while this organization's jobs are credited back as they run.
30
+ * @type {boolean}
31
+ * @memberof JobTrial
32
+ */
33
+ eligible: boolean;
34
+ /**
35
+ * Why the organization is not eligible. Omitted when eligible.
36
+ * @type {JobTrialReasonEnum}
37
+ * @memberof JobTrial
38
+ */
39
+ reason?: JobTrialReasonEnum;
40
+ /**
41
+ * The most the trial credits one organization, in cents.
42
+ * @type {number}
43
+ * @memberof JobTrial
44
+ */
45
+ capCents: number;
46
+ /**
47
+ * Trial credit added to the balance so far, in cents.
48
+ * @type {number}
49
+ * @memberof JobTrial
50
+ */
51
+ creditedCents: number;
52
+ /**
53
+ * How much more job cost the trial covers, in cents.
54
+ * @type {number}
55
+ * @memberof JobTrial
56
+ */
57
+ remainingCents: number;
58
+ /**
59
+ * The line to show the user, e.g. "Your first jobs are free, up to $10." Omitted when not eligible.
60
+ * @type {string}
61
+ * @memberof JobTrial
62
+ */
63
+ message?: string;
64
+ }
65
+
66
+
67
+ /**
68
+ * @export
69
+ */
70
+ export const JobTrialReasonEnum = {
71
+ Used: 'used',
72
+ ExistingUser: 'existing_user',
73
+ Internal: 'internal',
74
+ Frozen: 'frozen',
75
+ LinkedAccount: 'linked_account'
76
+ } as const;
77
+ export type JobTrialReasonEnum = typeof JobTrialReasonEnum[keyof typeof JobTrialReasonEnum];
78
+
79
+
80
+ /**
81
+ * Check if a given object implements the JobTrial interface.
82
+ */
83
+ export function instanceOfJobTrial(value: object): value is JobTrial {
84
+ if (!('enabled' in value) || value['enabled'] === undefined) return false;
85
+ if (!('eligible' in value) || value['eligible'] === undefined) return false;
86
+ if ((!('capCents' in (value as Record<string, any>)) && !('cap_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['capCents'] === undefined && (value as Record<string, any>)['cap_cents'] === undefined)) return false;
87
+ if ((!('creditedCents' in (value as Record<string, any>)) && !('credited_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['creditedCents'] === undefined && (value as Record<string, any>)['credited_cents'] === undefined)) return false;
88
+ if ((!('remainingCents' in (value as Record<string, any>)) && !('remaining_cents' in (value as Record<string, any>))) || ((value as Record<string, any>)['remainingCents'] === undefined && (value as Record<string, any>)['remaining_cents'] === undefined)) return false;
89
+ return true;
90
+ }
91
+
92
+ export function JobTrialFromJSON(json: any): JobTrial {
93
+ return JobTrialFromJSONTyped(json, false);
94
+ }
95
+
96
+ export function JobTrialFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobTrial {
97
+ if (json == null) {
98
+ return json;
99
+ }
100
+ return {
101
+
102
+ 'enabled': json['enabled'],
103
+ 'eligible': json['eligible'],
104
+ 'reason': json['reason'] == null ? undefined : json['reason'],
105
+ 'capCents': json['cap_cents'],
106
+ 'creditedCents': json['credited_cents'],
107
+ 'remainingCents': json['remaining_cents'],
108
+ 'message': json['message'] == null ? undefined : json['message'],
109
+ };
110
+ }
111
+
112
+ export function JobTrialToJSON(json: any): JobTrial {
113
+ return JobTrialToJSONTyped(json, false);
114
+ }
115
+
116
+ export function JobTrialToJSONTyped(value?: JobTrial | null, ignoreDiscriminator: boolean = false): any {
117
+ if (value == null) {
118
+ return value;
119
+ }
120
+
121
+ return {
122
+
123
+ 'enabled': value['enabled'],
124
+ 'eligible': value['eligible'],
125
+ 'reason': value['reason'],
126
+ 'cap_cents': value['capCents'],
127
+ 'credited_cents': value['creditedCents'],
128
+ 'remaining_cents': value['remainingCents'],
129
+ 'message': value['message'],
130
+ };
131
+ }
132
+