@hatchet-dev/typescript-sdk 0.16.0-alpha.3 → 0.16.0-alpha.4

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.
@@ -56,6 +56,7 @@ export declare const GPUComputeSchema: z.ZodObject<z.objectUtil.extendShape<{
56
56
  }, {
57
57
  cpuKind: z.ZodLiteral<"shared">;
58
58
  gpuKind: z.ZodEnum<["a10", "l40s", "a100-40gb", "a100-80gb"]>;
59
+ gpus: z.ZodNumber;
59
60
  regions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNativeEnum<typeof ManagedWorkerRegion>, "many">, ManagedWorkerRegion[], ManagedWorkerRegion[]>>;
60
61
  memoryMb: z.ZodEffects<z.ZodNumber, number, number>;
61
62
  }>, "strip", z.ZodTypeAny, {
@@ -64,6 +65,7 @@ export declare const GPUComputeSchema: z.ZodObject<z.objectUtil.extendShape<{
64
65
  cpuKind: "shared";
65
66
  memoryMb: number;
66
67
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
68
+ gpus: number;
67
69
  pool?: string | undefined;
68
70
  regions?: ManagedWorkerRegion[] | undefined;
69
71
  }, {
@@ -71,6 +73,7 @@ export declare const GPUComputeSchema: z.ZodObject<z.objectUtil.extendShape<{
71
73
  cpuKind: "shared";
72
74
  memoryMb: number;
73
75
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
76
+ gpus: number;
74
77
  pool?: string | undefined;
75
78
  numReplicas?: number | undefined;
76
79
  regions?: ManagedWorkerRegion[] | undefined;
@@ -128,6 +131,7 @@ export declare const ComputeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
128
131
  }, {
129
132
  cpuKind: z.ZodLiteral<"shared">;
130
133
  gpuKind: z.ZodEnum<["a10", "l40s", "a100-40gb", "a100-80gb"]>;
134
+ gpus: z.ZodNumber;
131
135
  regions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNativeEnum<typeof ManagedWorkerRegion>, "many">, ManagedWorkerRegion[], ManagedWorkerRegion[]>>;
132
136
  memoryMb: z.ZodEffects<z.ZodNumber, number, number>;
133
137
  }>, "strip", z.ZodTypeAny, {
@@ -136,6 +140,7 @@ export declare const ComputeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
136
140
  cpuKind: "shared";
137
141
  memoryMb: number;
138
142
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
143
+ gpus: number;
139
144
  pool?: string | undefined;
140
145
  regions?: ManagedWorkerRegion[] | undefined;
141
146
  }, {
@@ -143,6 +148,7 @@ export declare const ComputeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendS
143
148
  cpuKind: "shared";
144
149
  memoryMb: number;
145
150
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
151
+ gpus: number;
146
152
  pool?: string | undefined;
147
153
  numReplicas?: number | undefined;
148
154
  regions?: ManagedWorkerRegion[] | undefined;
@@ -49,6 +49,12 @@ const AllowedGPUManagedWorkerRegions = [data_contracts_1.ManagedWorkerRegion.Ord
49
49
  exports.GPUComputeSchema = BaseComputeSchema.extend({
50
50
  cpuKind: zod_1.z.literal('shared'),
51
51
  gpuKind: zod_1.z.enum(['a10', 'l40s', 'a100-40gb', 'a100-80gb']),
52
+ gpus: zod_1.z
53
+ .number()
54
+ .int()
55
+ .min(1, { message: 'Must be at least 1' })
56
+ .max(8, { message: 'Must be at most 8' })
57
+ .describe('The number of GPUs to use for the worker'),
52
58
  regions: zod_1.z
53
59
  .array(zod_1.z.nativeEnum(data_contracts_1.ManagedWorkerRegion))
54
60
  .refine((val) => val.every((region) => AllowedGPUManagedWorkerRegions.includes(region)), {
@@ -51,6 +51,7 @@ class ManagedCompute {
51
51
  }
52
52
  const key = (0, compute_config_1.computeHash)(compute);
53
53
  const gpuKind = 'gpuKind' in compute ? compute.gpuKind : undefined;
54
+ const gpus = 'gpus' in compute ? compute.gpus : undefined;
54
55
  if (!computeMap[key]) {
55
56
  computeMap[key] = {
56
57
  actions: [],
@@ -61,6 +62,7 @@ class ManagedCompute {
61
62
  regions: compute.regions,
62
63
  slots: this.maxRuns,
63
64
  gpuKind,
65
+ gpus,
64
66
  };
65
67
  }
66
68
  computeMap[key].actions.push(action);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchet-dev/typescript-sdk",
3
- "version": "0.16.0-alpha.3",
3
+ "version": "0.16.0-alpha.4",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
package/step.d.ts CHANGED
@@ -141,6 +141,7 @@ export declare const CreateStepSchema: z.ZodObject<{
141
141
  }, {
142
142
  cpuKind: z.ZodLiteral<"shared">;
143
143
  gpuKind: z.ZodEnum<["a10", "l40s", "a100-40gb", "a100-80gb"]>;
144
+ gpus: z.ZodNumber;
144
145
  regions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNativeEnum<typeof import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion>, "many">, import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[], import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[]>>;
145
146
  memoryMb: z.ZodEffects<z.ZodNumber, number, number>;
146
147
  }>, "strip", z.ZodTypeAny, {
@@ -149,6 +150,7 @@ export declare const CreateStepSchema: z.ZodObject<{
149
150
  cpuKind: "shared";
150
151
  memoryMb: number;
151
152
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
153
+ gpus: number;
152
154
  pool?: string | undefined;
153
155
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
154
156
  }, {
@@ -156,6 +158,7 @@ export declare const CreateStepSchema: z.ZodObject<{
156
158
  cpuKind: "shared";
157
159
  memoryMb: number;
158
160
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
161
+ gpus: number;
159
162
  pool?: string | undefined;
160
163
  numReplicas?: number | undefined;
161
164
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -185,6 +188,7 @@ export declare const CreateStepSchema: z.ZodObject<{
185
188
  cpuKind: "shared";
186
189
  memoryMb: number;
187
190
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
191
+ gpus: number;
188
192
  pool?: string | undefined;
189
193
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
190
194
  } | undefined;
@@ -226,6 +230,7 @@ export declare const CreateStepSchema: z.ZodObject<{
226
230
  cpuKind: "shared";
227
231
  memoryMb: number;
228
232
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
233
+ gpus: number;
229
234
  pool?: string | undefined;
230
235
  numReplicas?: number | undefined;
231
236
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
package/workflow.d.ts CHANGED
@@ -96,6 +96,7 @@ declare const StepsSchema: z.ZodArray<z.ZodObject<{
96
96
  }, {
97
97
  cpuKind: z.ZodLiteral<"shared">;
98
98
  gpuKind: z.ZodEnum<["a10", "l40s", "a100-40gb", "a100-80gb"]>;
99
+ gpus: z.ZodNumber;
99
100
  regions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNativeEnum<typeof import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion>, "many">, import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[], import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[]>>;
100
101
  memoryMb: z.ZodEffects<z.ZodNumber, number, number>;
101
102
  }>, "strip", z.ZodTypeAny, {
@@ -104,6 +105,7 @@ declare const StepsSchema: z.ZodArray<z.ZodObject<{
104
105
  cpuKind: "shared";
105
106
  memoryMb: number;
106
107
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
108
+ gpus: number;
107
109
  pool?: string | undefined;
108
110
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
109
111
  }, {
@@ -111,6 +113,7 @@ declare const StepsSchema: z.ZodArray<z.ZodObject<{
111
113
  cpuKind: "shared";
112
114
  memoryMb: number;
113
115
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
116
+ gpus: number;
114
117
  pool?: string | undefined;
115
118
  numReplicas?: number | undefined;
116
119
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -140,6 +143,7 @@ declare const StepsSchema: z.ZodArray<z.ZodObject<{
140
143
  cpuKind: "shared";
141
144
  memoryMb: number;
142
145
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
146
+ gpus: number;
143
147
  pool?: string | undefined;
144
148
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
145
149
  } | undefined;
@@ -181,6 +185,7 @@ declare const StepsSchema: z.ZodArray<z.ZodObject<{
181
185
  cpuKind: "shared";
182
186
  memoryMb: number;
183
187
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
188
+ gpus: number;
184
189
  pool?: string | undefined;
185
190
  numReplicas?: number | undefined;
186
191
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -347,6 +352,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
347
352
  }, {
348
353
  cpuKind: z.ZodLiteral<"shared">;
349
354
  gpuKind: z.ZodEnum<["a10", "l40s", "a100-40gb", "a100-80gb"]>;
355
+ gpus: z.ZodNumber;
350
356
  regions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNativeEnum<typeof import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion>, "many">, import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[], import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[]>>;
351
357
  memoryMb: z.ZodEffects<z.ZodNumber, number, number>;
352
358
  }>, "strip", z.ZodTypeAny, {
@@ -355,6 +361,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
355
361
  cpuKind: "shared";
356
362
  memoryMb: number;
357
363
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
364
+ gpus: number;
358
365
  pool?: string | undefined;
359
366
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
360
367
  }, {
@@ -362,6 +369,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
362
369
  cpuKind: "shared";
363
370
  memoryMb: number;
364
371
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
372
+ gpus: number;
365
373
  pool?: string | undefined;
366
374
  numReplicas?: number | undefined;
367
375
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -391,6 +399,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
391
399
  cpuKind: "shared";
392
400
  memoryMb: number;
393
401
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
402
+ gpus: number;
394
403
  pool?: string | undefined;
395
404
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
396
405
  } | undefined;
@@ -432,6 +441,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
432
441
  cpuKind: "shared";
433
442
  memoryMb: number;
434
443
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
444
+ gpus: number;
435
445
  pool?: string | undefined;
436
446
  numReplicas?: number | undefined;
437
447
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -546,6 +556,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
546
556
  }, {
547
557
  cpuKind: z.ZodLiteral<"shared">;
548
558
  gpuKind: z.ZodEnum<["a10", "l40s", "a100-40gb", "a100-80gb"]>;
559
+ gpus: z.ZodNumber;
549
560
  regions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodNativeEnum<typeof import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion>, "many">, import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[], import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[]>>;
550
561
  memoryMb: z.ZodEffects<z.ZodNumber, number, number>;
551
562
  }>, "strip", z.ZodTypeAny, {
@@ -554,6 +565,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
554
565
  cpuKind: "shared";
555
566
  memoryMb: number;
556
567
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
568
+ gpus: number;
557
569
  pool?: string | undefined;
558
570
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
559
571
  }, {
@@ -561,6 +573,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
561
573
  cpuKind: "shared";
562
574
  memoryMb: number;
563
575
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
576
+ gpus: number;
564
577
  pool?: string | undefined;
565
578
  numReplicas?: number | undefined;
566
579
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -590,6 +603,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
590
603
  cpuKind: "shared";
591
604
  memoryMb: number;
592
605
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
606
+ gpus: number;
593
607
  pool?: string | undefined;
594
608
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
595
609
  } | undefined;
@@ -631,6 +645,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
631
645
  cpuKind: "shared";
632
646
  memoryMb: number;
633
647
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
648
+ gpus: number;
634
649
  pool?: string | undefined;
635
650
  numReplicas?: number | undefined;
636
651
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -677,6 +692,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
677
692
  cpuKind: "shared";
678
693
  memoryMb: number;
679
694
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
695
+ gpus: number;
680
696
  pool?: string | undefined;
681
697
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
682
698
  } | undefined;
@@ -732,6 +748,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
732
748
  cpuKind: "shared";
733
749
  memoryMb: number;
734
750
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
751
+ gpus: number;
735
752
  pool?: string | undefined;
736
753
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
737
754
  } | undefined;
@@ -776,6 +793,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
776
793
  cpuKind: "shared";
777
794
  memoryMb: number;
778
795
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
796
+ gpus: number;
779
797
  pool?: string | undefined;
780
798
  numReplicas?: number | undefined;
781
799
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;
@@ -831,6 +849,7 @@ export declare const CreateWorkflowSchema: z.ZodObject<{
831
849
  cpuKind: "shared";
832
850
  memoryMb: number;
833
851
  gpuKind: "a10" | "l40s" | "a100-40gb" | "a100-80gb";
852
+ gpus: number;
834
853
  pool?: string | undefined;
835
854
  numReplicas?: number | undefined;
836
855
  regions?: import("./clients/rest/generated/cloud/data-contracts").ManagedWorkerRegion[] | undefined;