@epfml/discojs 3.0.1-p20251113101442.0 → 3.0.1-p20251113155020.0

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.
@@ -6,87 +6,27 @@ export declare namespace DisplayInformation {
6
6
  summary: z.ZodObject<{
7
7
  preview: z.ZodString;
8
8
  overview: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- preview: string;
11
- overview: string;
12
- }, {
13
- preview: string;
14
- overview: string;
15
- }>;
9
+ }, z.core.$strip>;
16
10
  dataFormatInformation: z.ZodOptional<z.ZodString>;
17
11
  model: z.ZodOptional<z.ZodString>;
18
12
  sampleDataset: z.ZodOptional<z.ZodObject<{
19
13
  link: z.ZodString;
20
14
  instructions: z.ZodString;
21
- }, "strip", z.ZodTypeAny, {
22
- link: string;
23
- instructions: string;
24
- }, {
25
- link: string;
26
- instructions: string;
27
- }>>;
28
- }, "strip", z.ZodTypeAny, {
29
- title: string;
30
- summary: {
31
- preview: string;
32
- overview: string;
33
- };
34
- dataFormatInformation?: string | undefined;
35
- model?: string | undefined;
36
- sampleDataset?: {
37
- link: string;
38
- instructions: string;
39
- } | undefined;
40
- }, {
41
- title: string;
42
- summary: {
43
- preview: string;
44
- overview: string;
45
- };
46
- dataFormatInformation?: string | undefined;
47
- model?: string | undefined;
48
- sampleDataset?: {
49
- link: string;
50
- instructions: string;
51
- } | undefined;
52
- }>;
15
+ }, z.core.$strip>>;
16
+ }, z.core.$strip>;
53
17
  const dataTypeToSchema: {
54
18
  image: z.ZodObject<{
55
19
  dataExample: z.ZodOptional<z.ZodString>;
56
- }, "strip", z.ZodTypeAny, {
57
- dataExample?: string | undefined;
58
- }, {
59
- dataExample?: string | undefined;
60
- }>;
20
+ }, z.core.$strip>;
61
21
  tabular: z.ZodObject<{
62
22
  dataExample: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
23
  name: z.ZodString;
64
24
  data: z.ZodString;
65
- }, "strip", z.ZodTypeAny, {
66
- name: string;
67
- data: string;
68
- }, {
69
- name: string;
70
- data: string;
71
- }>, "many">>;
72
- }, "strip", z.ZodTypeAny, {
73
- dataExample?: {
74
- name: string;
75
- data: string;
76
- }[] | undefined;
77
- }, {
78
- dataExample?: {
79
- name: string;
80
- data: string;
81
- }[] | undefined;
82
- }>;
25
+ }, z.core.$strip>>>;
26
+ }, z.core.$strip>;
83
27
  text: z.ZodObject<{
84
28
  dataExample: z.ZodOptional<z.ZodString>;
85
- }, "strip", z.ZodTypeAny, {
86
- dataExample?: string | undefined;
87
- }, {
88
- dataExample?: string | undefined;
89
- }>;
29
+ }, z.core.$strip>;
90
30
  };
91
31
  }
92
32
  export type DisplayInformation<D extends DataType> = (typeof DisplayInformation.dataTypeToSchema)[D];
@@ -1 +1 @@
1
- {"version":3,"file":"display_information.d.ts","sourceRoot":"","sources":["../../src/task/display_information.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,yBAAiB,kBAAkB,CAAC;IAC5B,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBrB,CAAC;IAEI,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAaQ,CAAC;CACtC;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,QAAQ,IAChD,CAAC,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"display_information.d.ts","sourceRoot":"","sources":["../../src/task/display_information.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,yBAAiB,kBAAkB,CAAC;IAC5B,MAAM,UAAU;;;;;;;;;;;;qBAgBrB,CAAC;IAEI,MAAM,gBAAgB;;;;;;;;;;;;;KAaQ,CAAC;CACtC;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,QAAQ,IAChD,CAAC,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -9,419 +9,106 @@ export declare namespace Task {
9
9
  summary: z.ZodObject<{
10
10
  preview: z.ZodString;
11
11
  overview: z.ZodString;
12
- }, "strip", z.ZodTypeAny, {
13
- preview: string;
14
- overview: string;
15
- }, {
16
- preview: string;
17
- overview: string;
18
- }>;
12
+ }, z.core.$strip>;
19
13
  dataFormatInformation: z.ZodOptional<z.ZodString>;
20
14
  model: z.ZodOptional<z.ZodString>;
21
15
  sampleDataset: z.ZodOptional<z.ZodObject<{
22
16
  link: z.ZodString;
23
17
  instructions: z.ZodString;
24
- }, "strip", z.ZodTypeAny, {
25
- link: string;
26
- instructions: string;
27
- }, {
28
- link: string;
29
- instructions: string;
30
- }>>;
31
- }, "strip", z.ZodTypeAny, {
32
- title: string;
33
- summary: {
34
- preview: string;
35
- overview: string;
36
- };
37
- dataFormatInformation?: string | undefined;
38
- model?: string | undefined;
39
- sampleDataset?: {
40
- link: string;
41
- instructions: string;
42
- } | undefined;
43
- }, {
44
- title: string;
45
- summary: {
46
- preview: string;
47
- overview: string;
48
- };
49
- dataFormatInformation?: string | undefined;
50
- model?: string | undefined;
51
- sampleDataset?: {
52
- link: string;
53
- instructions: string;
54
- } | undefined;
55
- }>;
18
+ }, z.core.$strip>>;
19
+ }, z.core.$strip>;
56
20
  trainingInformation: z.ZodObject<{
57
21
  epochs: z.ZodNumber;
58
22
  roundDuration: z.ZodNumber;
59
23
  validationSplit: z.ZodNumber;
60
24
  batchSize: z.ZodNumber;
61
- tensorBackend: z.ZodEnum<["gpt", "tfjs"]>;
62
- }, "strip", z.ZodTypeAny, {
63
- epochs: number;
64
- roundDuration: number;
65
- validationSplit: number;
66
- batchSize: number;
67
- tensorBackend: "gpt" | "tfjs";
68
- }, {
69
- epochs: number;
70
- roundDuration: number;
71
- validationSplit: number;
72
- batchSize: number;
73
- tensorBackend: "gpt" | "tfjs";
74
- }>;
75
- }, "strip", z.ZodTypeAny, {
76
- id: string;
77
- displayInformation: {
78
- title: string;
79
- summary: {
80
- preview: string;
81
- overview: string;
82
- };
83
- dataFormatInformation?: string | undefined;
84
- model?: string | undefined;
85
- sampleDataset?: {
86
- link: string;
87
- instructions: string;
88
- } | undefined;
89
- };
90
- trainingInformation: {
91
- epochs: number;
92
- roundDuration: number;
93
- validationSplit: number;
94
- batchSize: number;
95
- tensorBackend: "gpt" | "tfjs";
96
- };
97
- }, {
98
- id: string;
99
- displayInformation: {
100
- title: string;
101
- summary: {
102
- preview: string;
103
- overview: string;
104
- };
105
- dataFormatInformation?: string | undefined;
106
- model?: string | undefined;
107
- sampleDataset?: {
108
- link: string;
109
- instructions: string;
110
- } | undefined;
111
- };
112
- trainingInformation: {
113
- epochs: number;
114
- roundDuration: number;
115
- validationSplit: number;
116
- batchSize: number;
117
- tensorBackend: "gpt" | "tfjs";
118
- };
119
- }>;
25
+ tensorBackend: z.ZodEnum<{
26
+ gpt: "gpt";
27
+ tfjs: "tfjs";
28
+ }>;
29
+ }, z.core.$strip>;
30
+ }, z.core.$strip>;
120
31
  const dataTypeToSchema: {
121
32
  image: z.ZodObject<{
122
33
  dataType: z.ZodLiteral<"image">;
123
34
  displayInformation: z.ZodObject<{
124
35
  dataExample: z.ZodOptional<z.ZodString>;
125
- }, "strip", z.ZodTypeAny, {
126
- dataExample?: string | undefined;
127
- }, {
128
- dataExample?: string | undefined;
129
- }>;
36
+ }, z.core.$strip>;
130
37
  trainingInformation: z.ZodObject<{
131
- LABEL_LIST: z.ZodArray<z.ZodString, "many">;
38
+ LABEL_LIST: z.ZodArray<z.ZodString>;
132
39
  IMAGE_W: z.ZodNumber;
133
40
  IMAGE_H: z.ZodNumber;
134
- }, "strip", z.ZodTypeAny, {
135
- LABEL_LIST: string[];
136
- IMAGE_W: number;
137
- IMAGE_H: number;
138
- }, {
139
- LABEL_LIST: string[];
140
- IMAGE_W: number;
141
- IMAGE_H: number;
142
- }>;
143
- }, "strip", z.ZodTypeAny, {
144
- displayInformation: {
145
- dataExample?: string | undefined;
146
- };
147
- trainingInformation: {
148
- LABEL_LIST: string[];
149
- IMAGE_W: number;
150
- IMAGE_H: number;
151
- };
152
- dataType: "image";
153
- }, {
154
- displayInformation: {
155
- dataExample?: string | undefined;
156
- };
157
- trainingInformation: {
158
- LABEL_LIST: string[];
159
- IMAGE_W: number;
160
- IMAGE_H: number;
161
- };
162
- dataType: "image";
163
- }>;
41
+ }, z.core.$strip>;
42
+ }, z.core.$strip>;
164
43
  tabular: z.ZodObject<{
165
44
  dataType: z.ZodLiteral<"tabular">;
166
45
  displayInformation: z.ZodObject<{
167
46
  dataExample: z.ZodOptional<z.ZodArray<z.ZodObject<{
168
47
  name: z.ZodString;
169
48
  data: z.ZodString;
170
- }, "strip", z.ZodTypeAny, {
171
- name: string;
172
- data: string;
173
- }, {
174
- name: string;
175
- data: string;
176
- }>, "many">>;
177
- }, "strip", z.ZodTypeAny, {
178
- dataExample?: {
179
- name: string;
180
- data: string;
181
- }[] | undefined;
182
- }, {
183
- dataExample?: {
184
- name: string;
185
- data: string;
186
- }[] | undefined;
187
- }>;
49
+ }, z.core.$strip>>>;
50
+ }, z.core.$strip>;
188
51
  trainingInformation: z.ZodObject<{
189
- inputColumns: z.ZodArray<z.ZodString, "many">;
52
+ inputColumns: z.ZodArray<z.ZodString>;
190
53
  outputColumn: z.ZodString;
191
- }, "strip", z.ZodTypeAny, {
192
- inputColumns: string[];
193
- outputColumn: string;
194
- }, {
195
- inputColumns: string[];
196
- outputColumn: string;
197
- }>;
198
- }, "strip", z.ZodTypeAny, {
199
- displayInformation: {
200
- dataExample?: {
201
- name: string;
202
- data: string;
203
- }[] | undefined;
204
- };
205
- trainingInformation: {
206
- inputColumns: string[];
207
- outputColumn: string;
208
- };
209
- dataType: "tabular";
210
- }, {
211
- displayInformation: {
212
- dataExample?: {
213
- name: string;
214
- data: string;
215
- }[] | undefined;
216
- };
217
- trainingInformation: {
218
- inputColumns: string[];
219
- outputColumn: string;
220
- };
221
- dataType: "tabular";
222
- }>;
54
+ }, z.core.$strip>;
55
+ }, z.core.$strip>;
223
56
  text: z.ZodObject<{
224
57
  dataType: z.ZodLiteral<"text">;
225
58
  displayInformation: z.ZodObject<{
226
59
  dataExample: z.ZodOptional<z.ZodString>;
227
- }, "strip", z.ZodTypeAny, {
228
- dataExample?: string | undefined;
229
- }, {
230
- dataExample?: string | undefined;
231
- }>;
60
+ }, z.core.$strip>;
232
61
  trainingInformation: z.ZodObject<{
233
- tokenizer: z.ZodType<import("../index.js").Tokenizer, z.ZodTypeDef, import("../index.js").Tokenizer>;
62
+ tokenizer: z.ZodCustom<import("../index.js").Tokenizer, import("../index.js").Tokenizer>;
234
63
  contextLength: z.ZodNumber;
235
- }, "strip", z.ZodTypeAny, {
236
- contextLength: number;
237
- tokenizer: import("../index.js").Tokenizer;
238
- }, {
239
- contextLength: number;
240
- tokenizer: import("../index.js").Tokenizer;
241
- }>;
242
- }, "strip", z.ZodTypeAny, {
243
- displayInformation: {
244
- dataExample?: string | undefined;
245
- };
246
- trainingInformation: {
247
- contextLength: number;
248
- tokenizer: import("../index.js").Tokenizer;
249
- };
250
- dataType: "text";
251
- }, {
252
- displayInformation: {
253
- dataExample?: string | undefined;
254
- };
255
- trainingInformation: {
256
- contextLength: number;
257
- tokenizer: import("../index.js").Tokenizer;
258
- };
259
- dataType: "text";
260
- }>;
64
+ }, z.core.$strip>;
65
+ }, z.core.$strip>;
261
66
  };
262
67
  const networkToSchema: {
263
68
  decentralized: z.ZodObject<{
264
69
  trainingInformation: z.ZodIntersection<z.ZodObject<{
265
- scheme: z.ZodLiteral<"decentralized">;
266
- } & {
267
- privacy: z.ZodOptional<z.ZodEffects<z.ZodObject<{
70
+ privacy: z.ZodOptional<z.ZodPipe<z.ZodObject<{
268
71
  clippingRadius: z.ZodOptional<z.ZodNumber>;
269
72
  noiseScale: z.ZodOptional<z.ZodNumber>;
270
- }, "strip", z.ZodTypeAny, {
271
- clippingRadius?: number | undefined;
272
- noiseScale?: number | undefined;
273
- }, {
274
- clippingRadius?: number | undefined;
275
- noiseScale?: number | undefined;
276
- }>, {
73
+ }, z.core.$strip>, z.ZodTransform<{
277
74
  clippingRadius?: number | undefined;
278
75
  noiseScale?: number | undefined;
279
76
  } | undefined, {
280
77
  clippingRadius?: number | undefined;
281
78
  noiseScale?: number | undefined;
282
- }>>;
79
+ }>>>;
283
80
  minNbOfParticipants: z.ZodNumber;
284
- }, "strip", z.ZodTypeAny, {
285
- scheme: "decentralized";
286
- minNbOfParticipants: number;
287
- privacy?: {
288
- clippingRadius?: number | undefined;
289
- noiseScale?: number | undefined;
290
- } | undefined;
291
- }, {
292
- scheme: "decentralized";
293
- minNbOfParticipants: number;
294
- privacy?: {
295
- clippingRadius?: number | undefined;
296
- noiseScale?: number | undefined;
297
- } | undefined;
298
- }>, z.ZodUnion<[z.ZodObject<{
81
+ scheme: z.ZodLiteral<"decentralized">;
82
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
299
83
  aggregationStrategy: z.ZodLiteral<"mean">;
300
- }, "strip", z.ZodTypeAny, {
301
- aggregationStrategy: "mean";
302
- }, {
303
- aggregationStrategy: "mean";
304
- }>, z.ZodObject<{
84
+ }, z.core.$strip>, z.ZodObject<{
305
85
  aggregationStrategy: z.ZodLiteral<"secure">;
306
86
  maxShareValue: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
307
- }, "strip", z.ZodTypeAny, {
308
- aggregationStrategy: "secure";
309
- maxShareValue: number;
310
- }, {
311
- aggregationStrategy: "secure";
312
- maxShareValue?: number | undefined;
313
- }>]>>;
314
- }, "strip", z.ZodTypeAny, {
315
- trainingInformation: {
316
- scheme: "decentralized";
317
- minNbOfParticipants: number;
318
- privacy?: {
319
- clippingRadius?: number | undefined;
320
- noiseScale?: number | undefined;
321
- } | undefined;
322
- } & ({
323
- aggregationStrategy: "mean";
324
- } | {
325
- aggregationStrategy: "secure";
326
- maxShareValue: number;
327
- });
328
- }, {
329
- trainingInformation: {
330
- scheme: "decentralized";
331
- minNbOfParticipants: number;
332
- privacy?: {
333
- clippingRadius?: number | undefined;
334
- noiseScale?: number | undefined;
335
- } | undefined;
336
- } & ({
337
- aggregationStrategy: "mean";
338
- } | {
339
- aggregationStrategy: "secure";
340
- maxShareValue?: number | undefined;
341
- });
342
- }>;
87
+ }, z.core.$strip>]>>;
88
+ }, z.core.$strip>;
343
89
  federated: z.ZodObject<{
344
90
  trainingInformation: z.ZodObject<{
345
- scheme: z.ZodLiteral<"federated">;
346
- aggregationStrategy: z.ZodLiteral<"mean">;
347
- } & {
348
- privacy: z.ZodOptional<z.ZodEffects<z.ZodObject<{
91
+ privacy: z.ZodOptional<z.ZodPipe<z.ZodObject<{
349
92
  clippingRadius: z.ZodOptional<z.ZodNumber>;
350
93
  noiseScale: z.ZodOptional<z.ZodNumber>;
351
- }, "strip", z.ZodTypeAny, {
352
- clippingRadius?: number | undefined;
353
- noiseScale?: number | undefined;
354
- }, {
355
- clippingRadius?: number | undefined;
356
- noiseScale?: number | undefined;
357
- }>, {
94
+ }, z.core.$strip>, z.ZodTransform<{
358
95
  clippingRadius?: number | undefined;
359
96
  noiseScale?: number | undefined;
360
97
  } | undefined, {
361
98
  clippingRadius?: number | undefined;
362
99
  noiseScale?: number | undefined;
363
- }>>;
100
+ }>>>;
364
101
  minNbOfParticipants: z.ZodNumber;
365
- }, "strip", z.ZodTypeAny, {
366
- scheme: "federated";
367
- minNbOfParticipants: number;
368
- aggregationStrategy: "mean";
369
- privacy?: {
370
- clippingRadius?: number | undefined;
371
- noiseScale?: number | undefined;
372
- } | undefined;
373
- }, {
374
- scheme: "federated";
375
- minNbOfParticipants: number;
376
- aggregationStrategy: "mean";
377
- privacy?: {
378
- clippingRadius?: number | undefined;
379
- noiseScale?: number | undefined;
380
- } | undefined;
381
- }>;
382
- }, "strip", z.ZodTypeAny, {
383
- trainingInformation: {
384
- scheme: "federated";
385
- minNbOfParticipants: number;
386
- aggregationStrategy: "mean";
387
- privacy?: {
388
- clippingRadius?: number | undefined;
389
- noiseScale?: number | undefined;
390
- } | undefined;
391
- };
392
- }, {
393
- trainingInformation: {
394
- scheme: "federated";
395
- minNbOfParticipants: number;
396
- aggregationStrategy: "mean";
397
- privacy?: {
398
- clippingRadius?: number | undefined;
399
- noiseScale?: number | undefined;
400
- } | undefined;
401
- };
402
- }>;
102
+ scheme: z.ZodLiteral<"federated">;
103
+ aggregationStrategy: z.ZodLiteral<"mean">;
104
+ }, z.core.$strip>;
105
+ }, z.core.$strip>;
403
106
  local: z.ZodObject<{
404
107
  trainingInformation: z.ZodObject<{
405
108
  scheme: z.ZodLiteral<"local">;
406
109
  aggregationStrategy: z.ZodLiteral<"mean">;
407
- }, "strip", z.ZodTypeAny, {
408
- scheme: "local";
409
- aggregationStrategy: "mean";
410
- }, {
411
- scheme: "local";
412
- aggregationStrategy: "mean";
413
- }>;
414
- }, "strip", z.ZodTypeAny, {
415
- trainingInformation: {
416
- scheme: "local";
417
- aggregationStrategy: "mean";
418
- };
419
- }, {
420
- trainingInformation: {
421
- scheme: "local";
422
- aggregationStrategy: "mean";
423
- };
424
- }>;
110
+ }, z.core.$strip>;
111
+ }, z.core.$strip>;
425
112
  };
426
113
  const schema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
427
114
  id: z.ZodString;
@@ -430,410 +117,97 @@ export declare namespace Task {
430
117
  summary: z.ZodObject<{
431
118
  preview: z.ZodString;
432
119
  overview: z.ZodString;
433
- }, "strip", z.ZodTypeAny, {
434
- preview: string;
435
- overview: string;
436
- }, {
437
- preview: string;
438
- overview: string;
439
- }>;
120
+ }, z.core.$strip>;
440
121
  dataFormatInformation: z.ZodOptional<z.ZodString>;
441
122
  model: z.ZodOptional<z.ZodString>;
442
123
  sampleDataset: z.ZodOptional<z.ZodObject<{
443
124
  link: z.ZodString;
444
125
  instructions: z.ZodString;
445
- }, "strip", z.ZodTypeAny, {
446
- link: string;
447
- instructions: string;
448
- }, {
449
- link: string;
450
- instructions: string;
451
- }>>;
452
- }, "strip", z.ZodTypeAny, {
453
- title: string;
454
- summary: {
455
- preview: string;
456
- overview: string;
457
- };
458
- dataFormatInformation?: string | undefined;
459
- model?: string | undefined;
460
- sampleDataset?: {
461
- link: string;
462
- instructions: string;
463
- } | undefined;
464
- }, {
465
- title: string;
466
- summary: {
467
- preview: string;
468
- overview: string;
469
- };
470
- dataFormatInformation?: string | undefined;
471
- model?: string | undefined;
472
- sampleDataset?: {
473
- link: string;
474
- instructions: string;
475
- } | undefined;
476
- }>;
126
+ }, z.core.$strip>>;
127
+ }, z.core.$strip>;
477
128
  trainingInformation: z.ZodObject<{
478
129
  epochs: z.ZodNumber;
479
130
  roundDuration: z.ZodNumber;
480
131
  validationSplit: z.ZodNumber;
481
132
  batchSize: z.ZodNumber;
482
- tensorBackend: z.ZodEnum<["gpt", "tfjs"]>;
483
- }, "strip", z.ZodTypeAny, {
484
- epochs: number;
485
- roundDuration: number;
486
- validationSplit: number;
487
- batchSize: number;
488
- tensorBackend: "gpt" | "tfjs";
489
- }, {
490
- epochs: number;
491
- roundDuration: number;
492
- validationSplit: number;
493
- batchSize: number;
494
- tensorBackend: "gpt" | "tfjs";
495
- }>;
496
- }, "strip", z.ZodTypeAny, {
497
- id: string;
498
- displayInformation: {
499
- title: string;
500
- summary: {
501
- preview: string;
502
- overview: string;
503
- };
504
- dataFormatInformation?: string | undefined;
505
- model?: string | undefined;
506
- sampleDataset?: {
507
- link: string;
508
- instructions: string;
509
- } | undefined;
510
- };
511
- trainingInformation: {
512
- epochs: number;
513
- roundDuration: number;
514
- validationSplit: number;
515
- batchSize: number;
516
- tensorBackend: "gpt" | "tfjs";
517
- };
518
- }, {
519
- id: string;
520
- displayInformation: {
521
- title: string;
522
- summary: {
523
- preview: string;
524
- overview: string;
525
- };
526
- dataFormatInformation?: string | undefined;
527
- model?: string | undefined;
528
- sampleDataset?: {
529
- link: string;
530
- instructions: string;
531
- } | undefined;
532
- };
533
- trainingInformation: {
534
- epochs: number;
535
- roundDuration: number;
536
- validationSplit: number;
537
- batchSize: number;
538
- tensorBackend: "gpt" | "tfjs";
539
- };
540
- }>, z.ZodUnion<[z.ZodObject<{
133
+ tensorBackend: z.ZodEnum<{
134
+ gpt: "gpt";
135
+ tfjs: "tfjs";
136
+ }>;
137
+ }, z.core.$strip>;
138
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
541
139
  dataType: z.ZodLiteral<"image">;
542
140
  displayInformation: z.ZodObject<{
543
141
  dataExample: z.ZodOptional<z.ZodString>;
544
- }, "strip", z.ZodTypeAny, {
545
- dataExample?: string | undefined;
546
- }, {
547
- dataExample?: string | undefined;
548
- }>;
142
+ }, z.core.$strip>;
549
143
  trainingInformation: z.ZodObject<{
550
- LABEL_LIST: z.ZodArray<z.ZodString, "many">;
144
+ LABEL_LIST: z.ZodArray<z.ZodString>;
551
145
  IMAGE_W: z.ZodNumber;
552
146
  IMAGE_H: z.ZodNumber;
553
- }, "strip", z.ZodTypeAny, {
554
- LABEL_LIST: string[];
555
- IMAGE_W: number;
556
- IMAGE_H: number;
557
- }, {
558
- LABEL_LIST: string[];
559
- IMAGE_W: number;
560
- IMAGE_H: number;
561
- }>;
562
- }, "strip", z.ZodTypeAny, {
563
- displayInformation: {
564
- dataExample?: string | undefined;
565
- };
566
- trainingInformation: {
567
- LABEL_LIST: string[];
568
- IMAGE_W: number;
569
- IMAGE_H: number;
570
- };
571
- dataType: "image";
572
- }, {
573
- displayInformation: {
574
- dataExample?: string | undefined;
575
- };
576
- trainingInformation: {
577
- LABEL_LIST: string[];
578
- IMAGE_W: number;
579
- IMAGE_H: number;
580
- };
581
- dataType: "image";
582
- }>, z.ZodObject<{
147
+ }, z.core.$strip>;
148
+ }, z.core.$strip>, z.ZodObject<{
583
149
  dataType: z.ZodLiteral<"tabular">;
584
150
  displayInformation: z.ZodObject<{
585
151
  dataExample: z.ZodOptional<z.ZodArray<z.ZodObject<{
586
152
  name: z.ZodString;
587
153
  data: z.ZodString;
588
- }, "strip", z.ZodTypeAny, {
589
- name: string;
590
- data: string;
591
- }, {
592
- name: string;
593
- data: string;
594
- }>, "many">>;
595
- }, "strip", z.ZodTypeAny, {
596
- dataExample?: {
597
- name: string;
598
- data: string;
599
- }[] | undefined;
600
- }, {
601
- dataExample?: {
602
- name: string;
603
- data: string;
604
- }[] | undefined;
605
- }>;
154
+ }, z.core.$strip>>>;
155
+ }, z.core.$strip>;
606
156
  trainingInformation: z.ZodObject<{
607
- inputColumns: z.ZodArray<z.ZodString, "many">;
157
+ inputColumns: z.ZodArray<z.ZodString>;
608
158
  outputColumn: z.ZodString;
609
- }, "strip", z.ZodTypeAny, {
610
- inputColumns: string[];
611
- outputColumn: string;
612
- }, {
613
- inputColumns: string[];
614
- outputColumn: string;
615
- }>;
616
- }, "strip", z.ZodTypeAny, {
617
- displayInformation: {
618
- dataExample?: {
619
- name: string;
620
- data: string;
621
- }[] | undefined;
622
- };
623
- trainingInformation: {
624
- inputColumns: string[];
625
- outputColumn: string;
626
- };
627
- dataType: "tabular";
628
- }, {
629
- displayInformation: {
630
- dataExample?: {
631
- name: string;
632
- data: string;
633
- }[] | undefined;
634
- };
635
- trainingInformation: {
636
- inputColumns: string[];
637
- outputColumn: string;
638
- };
639
- dataType: "tabular";
640
- }>, z.ZodObject<{
159
+ }, z.core.$strip>;
160
+ }, z.core.$strip>, z.ZodObject<{
641
161
  dataType: z.ZodLiteral<"text">;
642
162
  displayInformation: z.ZodObject<{
643
163
  dataExample: z.ZodOptional<z.ZodString>;
644
- }, "strip", z.ZodTypeAny, {
645
- dataExample?: string | undefined;
646
- }, {
647
- dataExample?: string | undefined;
648
- }>;
164
+ }, z.core.$strip>;
649
165
  trainingInformation: z.ZodObject<{
650
- tokenizer: z.ZodType<import("../index.js").Tokenizer, z.ZodTypeDef, import("../index.js").Tokenizer>;
166
+ tokenizer: z.ZodCustom<import("../index.js").Tokenizer, import("../index.js").Tokenizer>;
651
167
  contextLength: z.ZodNumber;
652
- }, "strip", z.ZodTypeAny, {
653
- contextLength: number;
654
- tokenizer: import("../index.js").Tokenizer;
655
- }, {
656
- contextLength: number;
657
- tokenizer: import("../index.js").Tokenizer;
658
- }>;
659
- }, "strip", z.ZodTypeAny, {
660
- displayInformation: {
661
- dataExample?: string | undefined;
662
- };
663
- trainingInformation: {
664
- contextLength: number;
665
- tokenizer: import("../index.js").Tokenizer;
666
- };
667
- dataType: "text";
668
- }, {
669
- displayInformation: {
670
- dataExample?: string | undefined;
671
- };
672
- trainingInformation: {
673
- contextLength: number;
674
- tokenizer: import("../index.js").Tokenizer;
675
- };
676
- dataType: "text";
677
- }>]>>, z.ZodUnion<[z.ZodObject<{
168
+ }, z.core.$strip>;
169
+ }, z.core.$strip>]>>, z.ZodUnion<readonly [z.ZodObject<{
678
170
  trainingInformation: z.ZodIntersection<z.ZodObject<{
679
- scheme: z.ZodLiteral<"decentralized">;
680
- } & {
681
- privacy: z.ZodOptional<z.ZodEffects<z.ZodObject<{
171
+ privacy: z.ZodOptional<z.ZodPipe<z.ZodObject<{
682
172
  clippingRadius: z.ZodOptional<z.ZodNumber>;
683
173
  noiseScale: z.ZodOptional<z.ZodNumber>;
684
- }, "strip", z.ZodTypeAny, {
685
- clippingRadius?: number | undefined;
686
- noiseScale?: number | undefined;
687
- }, {
688
- clippingRadius?: number | undefined;
689
- noiseScale?: number | undefined;
690
- }>, {
174
+ }, z.core.$strip>, z.ZodTransform<{
691
175
  clippingRadius?: number | undefined;
692
176
  noiseScale?: number | undefined;
693
177
  } | undefined, {
694
178
  clippingRadius?: number | undefined;
695
179
  noiseScale?: number | undefined;
696
- }>>;
180
+ }>>>;
697
181
  minNbOfParticipants: z.ZodNumber;
698
- }, "strip", z.ZodTypeAny, {
699
- scheme: "decentralized";
700
- minNbOfParticipants: number;
701
- privacy?: {
702
- clippingRadius?: number | undefined;
703
- noiseScale?: number | undefined;
704
- } | undefined;
705
- }, {
706
- scheme: "decentralized";
707
- minNbOfParticipants: number;
708
- privacy?: {
709
- clippingRadius?: number | undefined;
710
- noiseScale?: number | undefined;
711
- } | undefined;
712
- }>, z.ZodUnion<[z.ZodObject<{
182
+ scheme: z.ZodLiteral<"decentralized">;
183
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
713
184
  aggregationStrategy: z.ZodLiteral<"mean">;
714
- }, "strip", z.ZodTypeAny, {
715
- aggregationStrategy: "mean";
716
- }, {
717
- aggregationStrategy: "mean";
718
- }>, z.ZodObject<{
185
+ }, z.core.$strip>, z.ZodObject<{
719
186
  aggregationStrategy: z.ZodLiteral<"secure">;
720
187
  maxShareValue: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
721
- }, "strip", z.ZodTypeAny, {
722
- aggregationStrategy: "secure";
723
- maxShareValue: number;
724
- }, {
725
- aggregationStrategy: "secure";
726
- maxShareValue?: number | undefined;
727
- }>]>>;
728
- }, "strip", z.ZodTypeAny, {
729
- trainingInformation: {
730
- scheme: "decentralized";
731
- minNbOfParticipants: number;
732
- privacy?: {
733
- clippingRadius?: number | undefined;
734
- noiseScale?: number | undefined;
735
- } | undefined;
736
- } & ({
737
- aggregationStrategy: "mean";
738
- } | {
739
- aggregationStrategy: "secure";
740
- maxShareValue: number;
741
- });
742
- }, {
743
- trainingInformation: {
744
- scheme: "decentralized";
745
- minNbOfParticipants: number;
746
- privacy?: {
747
- clippingRadius?: number | undefined;
748
- noiseScale?: number | undefined;
749
- } | undefined;
750
- } & ({
751
- aggregationStrategy: "mean";
752
- } | {
753
- aggregationStrategy: "secure";
754
- maxShareValue?: number | undefined;
755
- });
756
- }>, z.ZodObject<{
188
+ }, z.core.$strip>]>>;
189
+ }, z.core.$strip>, z.ZodObject<{
757
190
  trainingInformation: z.ZodObject<{
758
- scheme: z.ZodLiteral<"federated">;
759
- aggregationStrategy: z.ZodLiteral<"mean">;
760
- } & {
761
- privacy: z.ZodOptional<z.ZodEffects<z.ZodObject<{
191
+ privacy: z.ZodOptional<z.ZodPipe<z.ZodObject<{
762
192
  clippingRadius: z.ZodOptional<z.ZodNumber>;
763
193
  noiseScale: z.ZodOptional<z.ZodNumber>;
764
- }, "strip", z.ZodTypeAny, {
765
- clippingRadius?: number | undefined;
766
- noiseScale?: number | undefined;
767
- }, {
768
- clippingRadius?: number | undefined;
769
- noiseScale?: number | undefined;
770
- }>, {
194
+ }, z.core.$strip>, z.ZodTransform<{
771
195
  clippingRadius?: number | undefined;
772
196
  noiseScale?: number | undefined;
773
197
  } | undefined, {
774
198
  clippingRadius?: number | undefined;
775
199
  noiseScale?: number | undefined;
776
- }>>;
200
+ }>>>;
777
201
  minNbOfParticipants: z.ZodNumber;
778
- }, "strip", z.ZodTypeAny, {
779
- scheme: "federated";
780
- minNbOfParticipants: number;
781
- aggregationStrategy: "mean";
782
- privacy?: {
783
- clippingRadius?: number | undefined;
784
- noiseScale?: number | undefined;
785
- } | undefined;
786
- }, {
787
- scheme: "federated";
788
- minNbOfParticipants: number;
789
- aggregationStrategy: "mean";
790
- privacy?: {
791
- clippingRadius?: number | undefined;
792
- noiseScale?: number | undefined;
793
- } | undefined;
794
- }>;
795
- }, "strip", z.ZodTypeAny, {
796
- trainingInformation: {
797
- scheme: "federated";
798
- minNbOfParticipants: number;
799
- aggregationStrategy: "mean";
800
- privacy?: {
801
- clippingRadius?: number | undefined;
802
- noiseScale?: number | undefined;
803
- } | undefined;
804
- };
805
- }, {
806
- trainingInformation: {
807
- scheme: "federated";
808
- minNbOfParticipants: number;
809
- aggregationStrategy: "mean";
810
- privacy?: {
811
- clippingRadius?: number | undefined;
812
- noiseScale?: number | undefined;
813
- } | undefined;
814
- };
815
- }>, z.ZodObject<{
202
+ scheme: z.ZodLiteral<"federated">;
203
+ aggregationStrategy: z.ZodLiteral<"mean">;
204
+ }, z.core.$strip>;
205
+ }, z.core.$strip>, z.ZodObject<{
816
206
  trainingInformation: z.ZodObject<{
817
207
  scheme: z.ZodLiteral<"local">;
818
208
  aggregationStrategy: z.ZodLiteral<"mean">;
819
- }, "strip", z.ZodTypeAny, {
820
- scheme: "local";
821
- aggregationStrategy: "mean";
822
- }, {
823
- scheme: "local";
824
- aggregationStrategy: "mean";
825
- }>;
826
- }, "strip", z.ZodTypeAny, {
827
- trainingInformation: {
828
- scheme: "local";
829
- aggregationStrategy: "mean";
830
- };
831
- }, {
832
- trainingInformation: {
833
- scheme: "local";
834
- aggregationStrategy: "mean";
835
- };
836
- }>]>>;
209
+ }, z.core.$strip>;
210
+ }, z.core.$strip>]>>;
837
211
  }
838
212
  export type Task<D extends DataType, N extends Network> = z.infer<typeof Task.baseSchema> & z.infer<(typeof Task.dataTypeToSchema)[D]> & z.infer<(typeof Task.networkToSchema)[N]>;
839
213
  //# sourceMappingURL=task.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/task/task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKrD,yBAAiB,IAAI,CAAC;IACrB,KAAY,EAAE,GAAG,MAAM,CAAC;IAEjB,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIrB,CAAC;IAEI,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgBQ,CAAC;IAE/B,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUQ,CAAC;IAE9B,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAcjB,CAAC;CACH;AAED,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,OAAO,IAAI,CAAC,CAAC,KAAK,CAChE,OAAO,IAAI,CAAC,UAAU,CACtB,GACA,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1C,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/task/task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKrD,yBAAiB,IAAI,CAAC;IACrB,KAAY,EAAE,GAAG,MAAM,CAAC;IAEjB,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;qBAIrB,CAAC;IAEI,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgBQ,CAAC;IAE/B,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUQ,CAAC;IAE9B,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAcjB,CAAC;CACH;AAED,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,OAAO,IAAI,CAAC,CAAC,KAAK,CAChE,OAAO,IAAI,CAAC,UAAU,CACtB,GACA,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1C,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -7,154 +7,65 @@ export declare namespace TrainingInformation {
7
7
  roundDuration: z.ZodNumber;
8
8
  validationSplit: z.ZodNumber;
9
9
  batchSize: z.ZodNumber;
10
- tensorBackend: z.ZodEnum<["gpt", "tfjs"]>;
11
- }, "strip", z.ZodTypeAny, {
12
- epochs: number;
13
- roundDuration: number;
14
- validationSplit: number;
15
- batchSize: number;
16
- tensorBackend: "gpt" | "tfjs";
17
- }, {
18
- epochs: number;
19
- roundDuration: number;
20
- validationSplit: number;
21
- batchSize: number;
22
- tensorBackend: "gpt" | "tfjs";
23
- }>;
10
+ tensorBackend: z.ZodEnum<{
11
+ gpt: "gpt";
12
+ tfjs: "tfjs";
13
+ }>;
14
+ }, z.core.$strip>;
24
15
  const dataTypeToSchema: {
25
16
  image: z.ZodObject<{
26
- LABEL_LIST: z.ZodArray<z.ZodString, "many">;
17
+ LABEL_LIST: z.ZodArray<z.ZodString>;
27
18
  IMAGE_W: z.ZodNumber;
28
19
  IMAGE_H: z.ZodNumber;
29
- }, "strip", z.ZodTypeAny, {
30
- LABEL_LIST: string[];
31
- IMAGE_W: number;
32
- IMAGE_H: number;
33
- }, {
34
- LABEL_LIST: string[];
35
- IMAGE_W: number;
36
- IMAGE_H: number;
37
- }>;
20
+ }, z.core.$strip>;
38
21
  tabular: z.ZodObject<{
39
- inputColumns: z.ZodArray<z.ZodString, "many">;
22
+ inputColumns: z.ZodArray<z.ZodString>;
40
23
  outputColumn: z.ZodString;
41
- }, "strip", z.ZodTypeAny, {
42
- inputColumns: string[];
43
- outputColumn: string;
44
- }, {
45
- inputColumns: string[];
46
- outputColumn: string;
47
- }>;
24
+ }, z.core.$strip>;
48
25
  text: z.ZodObject<{
49
- tokenizer: z.ZodType<Tokenizer, z.ZodTypeDef, Tokenizer>;
26
+ tokenizer: z.ZodCustom<Tokenizer, Tokenizer>;
50
27
  contextLength: z.ZodNumber;
51
- }, "strip", z.ZodTypeAny, {
52
- contextLength: number;
53
- tokenizer: Tokenizer;
54
- }, {
55
- contextLength: number;
56
- tokenizer: Tokenizer;
57
- }>;
28
+ }, z.core.$strip>;
58
29
  };
59
30
  const networkToSchema: {
60
31
  decentralized: z.ZodIntersection<z.ZodObject<{
61
- scheme: z.ZodLiteral<"decentralized">;
62
- } & {
63
- privacy: z.ZodOptional<z.ZodEffects<z.ZodObject<{
32
+ privacy: z.ZodOptional<z.ZodPipe<z.ZodObject<{
64
33
  clippingRadius: z.ZodOptional<z.ZodNumber>;
65
34
  noiseScale: z.ZodOptional<z.ZodNumber>;
66
- }, "strip", z.ZodTypeAny, {
67
- clippingRadius?: number | undefined;
68
- noiseScale?: number | undefined;
69
- }, {
70
- clippingRadius?: number | undefined;
71
- noiseScale?: number | undefined;
72
- }>, {
35
+ }, z.core.$strip>, z.ZodTransform<{
73
36
  clippingRadius?: number | undefined;
74
37
  noiseScale?: number | undefined;
75
38
  } | undefined, {
76
39
  clippingRadius?: number | undefined;
77
40
  noiseScale?: number | undefined;
78
- }>>;
41
+ }>>>;
79
42
  minNbOfParticipants: z.ZodNumber;
80
- }, "strip", z.ZodTypeAny, {
81
- scheme: "decentralized";
82
- minNbOfParticipants: number;
83
- privacy?: {
84
- clippingRadius?: number | undefined;
85
- noiseScale?: number | undefined;
86
- } | undefined;
87
- }, {
88
- scheme: "decentralized";
89
- minNbOfParticipants: number;
90
- privacy?: {
91
- clippingRadius?: number | undefined;
92
- noiseScale?: number | undefined;
93
- } | undefined;
94
- }>, z.ZodUnion<[z.ZodObject<{
43
+ scheme: z.ZodLiteral<"decentralized">;
44
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
95
45
  aggregationStrategy: z.ZodLiteral<"mean">;
96
- }, "strip", z.ZodTypeAny, {
97
- aggregationStrategy: "mean";
98
- }, {
99
- aggregationStrategy: "mean";
100
- }>, z.ZodObject<{
46
+ }, z.core.$strip>, z.ZodObject<{
101
47
  aggregationStrategy: z.ZodLiteral<"secure">;
102
48
  maxShareValue: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
103
- }, "strip", z.ZodTypeAny, {
104
- aggregationStrategy: "secure";
105
- maxShareValue: number;
106
- }, {
107
- aggregationStrategy: "secure";
108
- maxShareValue?: number | undefined;
109
- }>]>>;
49
+ }, z.core.$strip>]>>;
110
50
  federated: z.ZodObject<{
111
- scheme: z.ZodLiteral<"federated">;
112
- aggregationStrategy: z.ZodLiteral<"mean">;
113
- } & {
114
- privacy: z.ZodOptional<z.ZodEffects<z.ZodObject<{
51
+ privacy: z.ZodOptional<z.ZodPipe<z.ZodObject<{
115
52
  clippingRadius: z.ZodOptional<z.ZodNumber>;
116
53
  noiseScale: z.ZodOptional<z.ZodNumber>;
117
- }, "strip", z.ZodTypeAny, {
118
- clippingRadius?: number | undefined;
119
- noiseScale?: number | undefined;
120
- }, {
121
- clippingRadius?: number | undefined;
122
- noiseScale?: number | undefined;
123
- }>, {
54
+ }, z.core.$strip>, z.ZodTransform<{
124
55
  clippingRadius?: number | undefined;
125
56
  noiseScale?: number | undefined;
126
57
  } | undefined, {
127
58
  clippingRadius?: number | undefined;
128
59
  noiseScale?: number | undefined;
129
- }>>;
60
+ }>>>;
130
61
  minNbOfParticipants: z.ZodNumber;
131
- }, "strip", z.ZodTypeAny, {
132
- scheme: "federated";
133
- minNbOfParticipants: number;
134
- aggregationStrategy: "mean";
135
- privacy?: {
136
- clippingRadius?: number | undefined;
137
- noiseScale?: number | undefined;
138
- } | undefined;
139
- }, {
140
- scheme: "federated";
141
- minNbOfParticipants: number;
142
- aggregationStrategy: "mean";
143
- privacy?: {
144
- clippingRadius?: number | undefined;
145
- noiseScale?: number | undefined;
146
- } | undefined;
147
- }>;
62
+ scheme: z.ZodLiteral<"federated">;
63
+ aggregationStrategy: z.ZodLiteral<"mean">;
64
+ }, z.core.$strip>;
148
65
  local: z.ZodObject<{
149
66
  scheme: z.ZodLiteral<"local">;
150
67
  aggregationStrategy: z.ZodLiteral<"mean">;
151
- }, "strip", z.ZodTypeAny, {
152
- scheme: "local";
153
- aggregationStrategy: "mean";
154
- }, {
155
- scheme: "local";
156
- aggregationStrategy: "mean";
157
- }>;
68
+ }, z.core.$strip>;
158
69
  };
159
70
  }
160
71
  export type TrainingInformation<D extends DataType, N extends Network> = z.infer<typeof TrainingInformation.baseSchema> & z.infer<(typeof TrainingInformation.dataTypeToSchema)[D]> & z.infer<(typeof TrainingInformation.networkToSchema)[N]>;
@@ -1 +1 @@
1
- {"version":3,"file":"training_information.d.ts","sourceRoot":"","sources":["../../src/task/training_information.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAsBxC,yBAAiB,mBAAmB,CAAC;IAC7B,MAAM,UAAU;;;;;;;;;;;;;;;;;;MAYrB,CAAC;IAEI,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuBQ,CAAC;IAE/B,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BQ,CAAC;CACrC;AAED,MAAM,MAAM,mBAAmB,CAC9B,CAAC,SAAS,QAAQ,EAClB,CAAC,SAAS,OAAO,IACd,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,UAAU,CAAC,GACjD,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GACzD,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"training_information.d.ts","sourceRoot":"","sources":["../../src/task/training_information.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAsBxC,yBAAiB,mBAAmB,CAAC;IAC7B,MAAM,UAAU;;;;;;;;;qBAYrB,CAAC;IAEI,MAAM,gBAAgB;;;;;;;;;;;;;;KAuBQ,CAAC;IAE/B,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BQ,CAAC;CACrC;AAED,MAAM,MAAM,mBAAmB,CAC9B,CAAC,SAAS,QAAQ,EAClB,CAAC,SAAS,OAAO,IACd,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,UAAU,CAAC,GACjD,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,GACzD,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -60,8 +60,8 @@ export var TrainingInformation;
60
60
  decentralized: z
61
61
  .object({
62
62
  scheme: z.literal("decentralized"),
63
+ ...nonLocalNetworkSchema.shape,
63
64
  })
64
- .merge(nonLocalNetworkSchema)
65
65
  .and(z.union([
66
66
  z.object({
67
67
  aggregationStrategy: z.literal("mean"),
@@ -73,12 +73,11 @@ export var TrainingInformation;
73
73
  maxShareValue: z.number().positive().int().optional().default(100),
74
74
  }),
75
75
  ])),
76
- federated: z
77
- .object({
76
+ federated: z.object({
78
77
  scheme: z.literal("federated"),
79
78
  aggregationStrategy: z.literal("mean"),
80
- })
81
- .merge(nonLocalNetworkSchema),
79
+ ...nonLocalNetworkSchema.shape,
80
+ }),
82
81
  local: z.object({
83
82
  scheme: z.literal("local"),
84
83
  aggregationStrategy: z.literal("mean"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epfml/discojs",
3
- "version": "3.0.1-p20251113101442.0",
3
+ "version": "3.0.1-p20251113155020.0",
4
4
  "type": "module",
5
5
  "exports": "./dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "simple-peer": "9",
29
29
  "tslib": "2",
30
30
  "ws": "8",
31
- "zod": "3"
31
+ "zod": "4"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@tensorflow/tfjs-node": "4",