@webwriter/deep-learning-model 0.0.1 → 1.0.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.
Files changed (186) hide show
  1. package/.github/workflows/main.yml +8 -0
  2. package/LICENSE +7 -0
  3. package/README.md +290 -0
  4. package/components/dataset-input/dataset-input.styles.ts +20 -0
  5. package/components/dataset-input/dataset-input.ts +196 -0
  6. package/components/inference-fields/class-input.ts +83 -0
  7. package/components/inference-fields/class-output.ts +62 -0
  8. package/components/inference-fields/image-input.ts +182 -0
  9. package/components/inference-fields/image.ts +82 -0
  10. package/components/inference-fields/inference-interfaces.ts +15 -0
  11. package/components/inference-fields/number-input.ts +62 -0
  12. package/components/inference-fields/number-output.ts +56 -0
  13. package/components/model-editor.ts +288 -0
  14. package/components/model-tests/bad-samples.ts +152 -0
  15. package/components/model-tests/loss-distribution.ts +174 -0
  16. package/components/reference-element-select.ts +105 -0
  17. package/custom-elements.json +1470 -0
  18. package/custom.d.ts +180 -0
  19. package/dist/widgets/webwriter-feature-engineering.css +444 -0
  20. package/dist/widgets/webwriter-feature-engineering.js +112763 -0
  21. package/dist/widgets/webwriter-model-designing.css +444 -0
  22. package/dist/widgets/webwriter-model-designing.js +114587 -0
  23. package/dist/widgets/webwriter-model-evaluation.css +444 -0
  24. package/dist/widgets/webwriter-model-evaluation.js +119010 -0
  25. package/dist/widgets/webwriter-model-prediction.css +444 -0
  26. package/dist/widgets/webwriter-model-prediction.js +109251 -0
  27. package/dist/widgets/webwriter-model-training.css +444 -0
  28. package/dist/widgets/webwriter-model-training.js +121465 -0
  29. package/editing-config.json +73 -0
  30. package/icon.svg +1 -0
  31. package/lib/dataset/class.ts +155 -0
  32. package/lib/dataset/dataset.ts +293 -0
  33. package/lib/dataset/feature.ts +110 -0
  34. package/lib/dataset/image.ts +312 -0
  35. package/lib/dataset/linear.ts +120 -0
  36. package/lib/layers/activation.ts +48 -0
  37. package/lib/layers/add.ts +50 -0
  38. package/lib/layers/attention.ts +74 -0
  39. package/lib/layers/concat.ts +50 -0
  40. package/lib/layers/conv.ts +83 -0
  41. package/lib/layers/dropout.ts +44 -0
  42. package/lib/layers/fcl.ts +66 -0
  43. package/lib/layers/flatten.ts +48 -0
  44. package/lib/layers/index.ts +770 -0
  45. package/lib/layers/input.ts +55 -0
  46. package/lib/layers/noise.ts +43 -0
  47. package/lib/layers/output.ts +64 -0
  48. package/lib/layers/reshape.ts +76 -0
  49. package/lib/layers/transposeconv.ts +90 -0
  50. package/lib/tflib.ts +10 -0
  51. package/lit-localize.json +47 -0
  52. package/localization/ar.xlf +553 -0
  53. package/localization/bg.xlf +552 -0
  54. package/localization/cs.xlf +553 -0
  55. package/localization/da.xlf +552 -0
  56. package/localization/de.xlf +552 -0
  57. package/localization/el.xlf +554 -0
  58. package/localization/es.xlf +553 -0
  59. package/localization/et.xlf +553 -0
  60. package/localization/fi.xlf +552 -0
  61. package/localization/fr.xlf +553 -0
  62. package/localization/generated/ar.ts +159 -0
  63. package/localization/generated/bg.ts +158 -0
  64. package/localization/generated/cs.ts +159 -0
  65. package/localization/generated/da.ts +158 -0
  66. package/localization/generated/de.ts +158 -0
  67. package/localization/generated/el.ts +160 -0
  68. package/localization/generated/es.ts +159 -0
  69. package/localization/generated/et.ts +159 -0
  70. package/localization/generated/fi.ts +158 -0
  71. package/localization/generated/fr.ts +159 -0
  72. package/localization/generated/hu.ts +158 -0
  73. package/localization/generated/id.ts +159 -0
  74. package/localization/generated/index.js +3 -0
  75. package/localization/generated/it.ts +159 -0
  76. package/localization/generated/ja.ts +158 -0
  77. package/localization/generated/ko.ts +158 -0
  78. package/localization/generated/locale-codes.js +83 -0
  79. package/localization/generated/lt.ts +158 -0
  80. package/localization/generated/lv.ts +158 -0
  81. package/localization/generated/nb.ts +158 -0
  82. package/localization/generated/nl.ts +158 -0
  83. package/localization/generated/pl.ts +159 -0
  84. package/localization/generated/pt-BR.ts +159 -0
  85. package/localization/generated/pt-PT.ts +159 -0
  86. package/localization/generated/ro.ts +159 -0
  87. package/localization/generated/ru.ts +159 -0
  88. package/localization/generated/sk.ts +159 -0
  89. package/localization/generated/sl.ts +159 -0
  90. package/localization/generated/sv.ts +158 -0
  91. package/localization/generated/tr.ts +158 -0
  92. package/localization/generated/uk.ts +158 -0
  93. package/localization/generated/zh-hans.ts +141 -0
  94. package/localization/generated/zh-hant.ts +141 -0
  95. package/localization/hu.xlf +552 -0
  96. package/localization/id.xlf +553 -0
  97. package/localization/it.xlf +553 -0
  98. package/localization/ja.xlf +552 -0
  99. package/localization/ko.xlf +552 -0
  100. package/localization/lt.xlf +552 -0
  101. package/localization/lv.xlf +552 -0
  102. package/localization/nb.xlf +552 -0
  103. package/localization/nl.xlf +552 -0
  104. package/localization/pkg/ar.xliff +7 -0
  105. package/localization/pkg/bg.xliff +7 -0
  106. package/localization/pkg/cs.xliff +7 -0
  107. package/localization/pkg/da.xliff +7 -0
  108. package/localization/pkg/de.xliff +7 -0
  109. package/localization/pkg/el.xliff +7 -0
  110. package/localization/pkg/es.xliff +7 -0
  111. package/localization/pkg/et.xliff +7 -0
  112. package/localization/pkg/fi.xliff +7 -0
  113. package/localization/pkg/fr.xliff +7 -0
  114. package/localization/pkg/hu.xliff +7 -0
  115. package/localization/pkg/id.xliff +7 -0
  116. package/localization/pkg/it.xliff +7 -0
  117. package/localization/pkg/ja.xliff +7 -0
  118. package/localization/pkg/ko.xliff +7 -0
  119. package/localization/pkg/lt.xliff +7 -0
  120. package/localization/pkg/lv.xliff +7 -0
  121. package/localization/pkg/nb.xliff +7 -0
  122. package/localization/pkg/nl.xliff +7 -0
  123. package/localization/pkg/pl.xliff +7 -0
  124. package/localization/pkg/pt-BR.xliff +7 -0
  125. package/localization/pkg/pt-PT.xliff +7 -0
  126. package/localization/pkg/ro.xliff +7 -0
  127. package/localization/pkg/ru.xliff +7 -0
  128. package/localization/pkg/sk.xliff +7 -0
  129. package/localization/pkg/sl.xliff +7 -0
  130. package/localization/pkg/sv.xliff +7 -0
  131. package/localization/pkg/tr.xliff +7 -0
  132. package/localization/pkg/uk.xliff +7 -0
  133. package/localization/pkg/zh-hans.xliff +7 -0
  134. package/localization/pkg/zh-hant.xliff +7 -0
  135. package/localization/pl.xlf +553 -0
  136. package/localization/pt-BR.xlf +553 -0
  137. package/localization/pt-PT.xlf +553 -0
  138. package/localization/ro.xlf +553 -0
  139. package/localization/ru.xlf +553 -0
  140. package/localization/sk.xlf +553 -0
  141. package/localization/sl.xlf +553 -0
  142. package/localization/snippets/ar.xliff +16 -0
  143. package/localization/snippets/bg.xliff +16 -0
  144. package/localization/snippets/cs.xliff +16 -0
  145. package/localization/snippets/da.xliff +16 -0
  146. package/localization/snippets/de.xliff +16 -0
  147. package/localization/snippets/el.xliff +16 -0
  148. package/localization/snippets/es.xliff +16 -0
  149. package/localization/snippets/et.xliff +16 -0
  150. package/localization/snippets/fi.xliff +16 -0
  151. package/localization/snippets/fr.xliff +16 -0
  152. package/localization/snippets/hu.xliff +16 -0
  153. package/localization/snippets/id.xliff +16 -0
  154. package/localization/snippets/it.xliff +16 -0
  155. package/localization/snippets/ja.xliff +16 -0
  156. package/localization/snippets/ko.xliff +16 -0
  157. package/localization/snippets/lt.xliff +16 -0
  158. package/localization/snippets/lv.xliff +16 -0
  159. package/localization/snippets/nb.xliff +16 -0
  160. package/localization/snippets/nl.xliff +16 -0
  161. package/localization/snippets/pl.xliff +16 -0
  162. package/localization/snippets/pt-BR.xliff +16 -0
  163. package/localization/snippets/pt-PT.xliff +16 -0
  164. package/localization/snippets/ro.xliff +16 -0
  165. package/localization/snippets/ru.xliff +16 -0
  166. package/localization/snippets/sk.xliff +16 -0
  167. package/localization/snippets/sl.xliff +16 -0
  168. package/localization/snippets/sv.xliff +16 -0
  169. package/localization/snippets/tr.xliff +16 -0
  170. package/localization/snippets/uk.xliff +16 -0
  171. package/localization/snippets/zh-hans.xliff +16 -0
  172. package/localization/snippets/zh-hant.xliff +16 -0
  173. package/localization/sv.xlf +552 -0
  174. package/localization/tr.xlf +552 -0
  175. package/localization/uk.xlf +552 -0
  176. package/localization/zh-hans.xlf +552 -0
  177. package/localization/zh-hant.xlf +552 -0
  178. package/package.json +103 -2
  179. package/snippets/MNIST.html +21 -0
  180. package/test.json +63 -0
  181. package/tsconfig.json +8 -0
  182. package/widgets/webwriter-feature-engineering.ts +421 -0
  183. package/widgets/webwriter-model-designing.ts +323 -0
  184. package/widgets/webwriter-model-evaluation.ts +215 -0
  185. package/widgets/webwriter-model-prediction.ts +307 -0
  186. package/widgets/webwriter-model-training.ts +709 -0
@@ -0,0 +1,1470 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "widgets/webwriter-feature-engineering.ts",
8
+ "declarations": [
9
+ {
10
+ "kind": "class",
11
+ "description": "A widget that allows feature engineering on a dataset",
12
+ "name": "AiWidgetsFeatures",
13
+ "members": [
14
+ {
15
+ "kind": "field",
16
+ "name": "localize",
17
+ "privacy": "protected",
18
+ "default": "LOCALIZE"
19
+ },
20
+ {
21
+ "kind": "field",
22
+ "name": "samplesSave",
23
+ "type": {
24
+ "text": "string"
25
+ },
26
+ "description": "The original decompressed data in a json string with format of RawSample[]",
27
+ "attribute": "samplesSave",
28
+ "reflects": true
29
+ },
30
+ {
31
+ "kind": "field",
32
+ "name": "samples",
33
+ "type": {
34
+ "text": "Array<Record<string, string>>"
35
+ },
36
+ "privacy": "private"
37
+ },
38
+ {
39
+ "kind": "field",
40
+ "name": "fieldProps",
41
+ "type": {
42
+ "text": "Record<string, FieldProp>"
43
+ },
44
+ "description": "Stores the settings of the feature columns",
45
+ "attribute": "fieldProps",
46
+ "reflects": true
47
+ },
48
+ {
49
+ "kind": "field",
50
+ "name": "rawDataset",
51
+ "type": {
52
+ "text": "Dataset"
53
+ },
54
+ "privacy": "private"
55
+ },
56
+ {
57
+ "kind": "field",
58
+ "name": "tensorDataset",
59
+ "type": {
60
+ "text": "TransformedDataset"
61
+ },
62
+ "privacy": "private"
63
+ },
64
+ {
65
+ "kind": "field",
66
+ "name": "activeHeader",
67
+ "type": {
68
+ "text": "string"
69
+ },
70
+ "privacy": "private",
71
+ "default": "\"\"",
72
+ "description": "The selected feature column"
73
+ },
74
+ {
75
+ "kind": "field",
76
+ "name": "limit",
77
+ "type": {
78
+ "text": "number"
79
+ },
80
+ "default": "1000",
81
+ "description": "The number of samples used for the dataset",
82
+ "attribute": "limit",
83
+ "reflects": true
84
+ },
85
+ {
86
+ "kind": "field",
87
+ "name": "isInitiated",
88
+ "type": {
89
+ "text": "boolean"
90
+ },
91
+ "privacy": "protected",
92
+ "default": "false",
93
+ "attribute": "isInitiated"
94
+ },
95
+ {
96
+ "kind": "field",
97
+ "name": "editMode",
98
+ "type": {
99
+ "text": "\"edit\"|\"feat\"|\"read\"|\"hidden\""
100
+ },
101
+ "default": "\"edit\"",
102
+ "description": "What students will be able to edit in the explorable. Ranging from \"edit\" = everything, \"feat\" = only feature settings, \"read\" = read only, to \"hidden\" = invisible to the students.",
103
+ "attribute": "editMode",
104
+ "reflects": true
105
+ },
106
+ {
107
+ "kind": "method",
108
+ "name": "renderSelectDataset",
109
+ "privacy": "private"
110
+ },
111
+ {
112
+ "kind": "method",
113
+ "name": "renderTableHeader",
114
+ "privacy": "private"
115
+ },
116
+ {
117
+ "kind": "method",
118
+ "name": "renderFieldValues",
119
+ "privacy": "private",
120
+ "parameters": [
121
+ {
122
+ "name": "fieldName",
123
+ "type": {
124
+ "text": "string"
125
+ }
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "kind": "method",
131
+ "name": "renderFieldTypeSelector",
132
+ "privacy": "private",
133
+ "parameters": [
134
+ {
135
+ "name": "fieldName",
136
+ "type": {
137
+ "text": "string"
138
+ }
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "kind": "method",
144
+ "name": "handleDataset",
145
+ "privacy": "private",
146
+ "parameters": [
147
+ {
148
+ "name": "data",
149
+ "type": {
150
+ "text": "Array<Record<string, string>>"
151
+ },
152
+ "description": "The dataset"
153
+ },
154
+ {
155
+ "name": "errors",
156
+ "type": {
157
+ "text": "Array<any>"
158
+ },
159
+ "description": "Possible errors from loading the dataset"
160
+ },
161
+ {
162
+ "name": "meta",
163
+ "type": {
164
+ "text": "any"
165
+ },
166
+ "description": "Should at least contain a list of feature column names in meta.fields"
167
+ }
168
+ ],
169
+ "description": "Called when a new dataset is provided"
170
+ },
171
+ {
172
+ "kind": "method",
173
+ "name": "getDataset",
174
+ "description": "Returns the current dataset in both raw and tensor form"
175
+ },
176
+ {
177
+ "kind": "method",
178
+ "name": "updateTensorDataset",
179
+ "privacy": "private",
180
+ "description": "Called everytime settings change to generate the new tensor dataset."
181
+ },
182
+ {
183
+ "kind": "method",
184
+ "name": "handleHeaderClick",
185
+ "privacy": "private",
186
+ "parameters": [
187
+ {
188
+ "name": "e",
189
+ "type": {
190
+ "text": "Event"
191
+ },
192
+ "description": "The event from the button of the tab"
193
+ }
194
+ ],
195
+ "description": "Switches to the clicked tab"
196
+ },
197
+ {
198
+ "kind": "method",
199
+ "name": "deleteDataset",
200
+ "privacy": "private"
201
+ },
202
+ {
203
+ "kind": "method",
204
+ "name": "handleSizeChange",
205
+ "privacy": "private",
206
+ "description": "Called when the limit is chanded"
207
+ },
208
+ {
209
+ "kind": "method",
210
+ "name": "handleFeatureSettingsChange",
211
+ "privacy": "private",
212
+ "parameters": [
213
+ {
214
+ "name": "settings",
215
+ "type": {
216
+ "text": "Record<string, any>"
217
+ },
218
+ "description": "New settings"
219
+ }
220
+ ],
221
+ "description": "Called when the user changes the feature settings"
222
+ },
223
+ {
224
+ "kind": "method",
225
+ "name": "_triggerChanged",
226
+ "privacy": "private",
227
+ "description": "Tells listening widgets when the dataset changed"
228
+ },
229
+ {
230
+ "kind": "method",
231
+ "name": "isReady",
232
+ "privacy": "public",
233
+ "return": {
234
+ "type": {
235
+ "text": ""
236
+ }
237
+ },
238
+ "description": "Checks whether the dataset is ready to be used"
239
+ }
240
+ ],
241
+ "events": [
242
+ {
243
+ "name": "change",
244
+ "type": {
245
+ "text": "CustomEvent"
246
+ },
247
+ "description": "Fired when the dataset changes. Detail contains { dataset: Dataset, tensorDataset: TransformedDataset }"
248
+ }
249
+ ],
250
+ "attributes": [
251
+ {
252
+ "name": "samplesSave",
253
+ "type": {
254
+ "text": "string"
255
+ },
256
+ "description": "The original decompressed data in a json string with format of RawSample[]",
257
+ "fieldName": "samplesSave"
258
+ },
259
+ {
260
+ "name": "fieldProps",
261
+ "type": {
262
+ "text": "Record<string, FieldProp>"
263
+ },
264
+ "description": "Stores the settings of the feature columns",
265
+ "fieldName": "fieldProps"
266
+ },
267
+ {
268
+ "name": "limit",
269
+ "type": {
270
+ "text": "number"
271
+ },
272
+ "default": "1000",
273
+ "description": "The number of samples used for the dataset",
274
+ "fieldName": "limit"
275
+ },
276
+ {
277
+ "name": "isInitiated",
278
+ "type": {
279
+ "text": "boolean"
280
+ },
281
+ "default": "false",
282
+ "fieldName": "isInitiated"
283
+ },
284
+ {
285
+ "name": "editMode",
286
+ "type": {
287
+ "text": "\"edit\"|\"feat\"|\"read\"|\"hidden\""
288
+ },
289
+ "default": "\"edit\"",
290
+ "description": "What students will be able to edit in the explorable. Ranging from \"edit\" = everything, \"feat\" = only feature settings, \"read\" = read only, to \"hidden\" = invisible to the students.",
291
+ "fieldName": "editMode"
292
+ }
293
+ ],
294
+ "superclass": {
295
+ "name": "LitElementWw",
296
+ "package": "@webwriter/lit"
297
+ },
298
+ "tagName": "webwriter-feature-engineering",
299
+ "customElement": true,
300
+ "modulePath": "widgets/webwriter-feature-engineering.ts",
301
+ "definitionPath": "widgets/webwriter-feature-engineering.ts"
302
+ }
303
+ ],
304
+ "exports": [
305
+ {
306
+ "kind": "js",
307
+ "name": "AiWidgetsFeatures",
308
+ "declaration": {
309
+ "name": "AiWidgetsFeatures",
310
+ "module": "widgets/webwriter-feature-engineering.ts"
311
+ }
312
+ },
313
+ {
314
+ "kind": "custom-element-definition",
315
+ "name": "webwriter-feature-engineering",
316
+ "declaration": {
317
+ "name": "AiWidgetsFeatures",
318
+ "module": "widgets/webwriter-feature-engineering.ts"
319
+ }
320
+ }
321
+ ]
322
+ },
323
+ {
324
+ "kind": "javascript-module",
325
+ "path": "widgets/webwriter-model-designing.ts",
326
+ "declarations": [
327
+ {
328
+ "kind": "class",
329
+ "description": "A widget to design AI models using a visual editor.",
330
+ "name": "AiWidgetsDesigns",
331
+ "members": [
332
+ {
333
+ "kind": "field",
334
+ "name": "localize",
335
+ "privacy": "protected",
336
+ "default": "LOCALIZE"
337
+ },
338
+ {
339
+ "kind": "field",
340
+ "name": "state",
341
+ "type": {
342
+ "text": "string"
343
+ },
344
+ "description": "Stores the state of the model editor as a json string",
345
+ "attribute": "state",
346
+ "reflects": true
347
+ },
348
+ {
349
+ "kind": "field",
350
+ "name": "featureWidgetId",
351
+ "type": {
352
+ "text": "string"
353
+ },
354
+ "description": "Stores the reference id of the widget where the dataset is used from",
355
+ "attribute": "featureWidgetId",
356
+ "reflects": true
357
+ },
358
+ {
359
+ "kind": "field",
360
+ "name": "refSelect",
361
+ "type": {
362
+ "text": "AiWidgetsReferenceSelect"
363
+ },
364
+ "privacy": "private"
365
+ },
366
+ {
367
+ "kind": "field",
368
+ "name": "editMode",
369
+ "type": {
370
+ "text": "\"edit\"|\"layer\"|\"read\"|\"hidden\""
371
+ },
372
+ "default": "\"edit\"",
373
+ "description": "What students will be able to edit in the explorable. Ranging from \"edit\" = everything, \"layer\" = only layer settings, \"read\" = read only, to \"hidden\" = invisible to the students.",
374
+ "attribute": "editMode",
375
+ "reflects": true
376
+ },
377
+ {
378
+ "kind": "field",
379
+ "name": "maxModelParameters",
380
+ "type": {
381
+ "text": "number"
382
+ },
383
+ "default": "100000",
384
+ "description": "The maximum number of total parameters allowed for training the model. Only checked by the training widget.",
385
+ "attribute": "maxModelParameters",
386
+ "reflects": true
387
+ },
388
+ {
389
+ "kind": "field",
390
+ "name": "maxLayerParameters",
391
+ "type": {
392
+ "text": "number"
393
+ },
394
+ "default": "10000",
395
+ "description": "The maximum number of parameters allowed per layer to allow training the model.",
396
+ "attribute": "maxLayerParameters",
397
+ "reflects": true
398
+ },
399
+ {
400
+ "kind": "method",
401
+ "name": "_handleRefChange",
402
+ "privacy": "private",
403
+ "parameters": [
404
+ {
405
+ "name": "e",
406
+ "type": {
407
+ "text": "CustomEvent"
408
+ },
409
+ "description": "Contains e.detail.id for the new widget providing the dataset"
410
+ }
411
+ ],
412
+ "description": "Called when the feature dataset source widget is changed."
413
+ },
414
+ {
415
+ "kind": "field",
416
+ "name": "currentCanvas",
417
+ "type": {
418
+ "text": "ModelEditor"
419
+ },
420
+ "description": "Reference to the current model editor canvas"
421
+ },
422
+ {
423
+ "kind": "field",
424
+ "name": "hasSelection",
425
+ "type": {
426
+ "text": "boolean"
427
+ },
428
+ "privacy": "private",
429
+ "default": "false",
430
+ "description": "Whether a layer or connection is currently selected in the model editor.\r\nControls the visibility of the delete button."
431
+ },
432
+ {
433
+ "kind": "method",
434
+ "name": "_selectionChange",
435
+ "privacy": "private",
436
+ "parameters": [
437
+ {
438
+ "name": "e",
439
+ "type": {
440
+ "text": "CustomEvent"
441
+ }
442
+ }
443
+ ],
444
+ "description": "Called when the selection inside the model editor changed"
445
+ },
446
+ {
447
+ "kind": "method",
448
+ "name": "_editorChange",
449
+ "privacy": "private",
450
+ "parameters": [
451
+ {
452
+ "name": "e",
453
+ "type": {
454
+ "text": "CustomEvent"
455
+ }
456
+ }
457
+ ],
458
+ "description": "Called when the model design inside the model editor was changed"
459
+ },
460
+ {
461
+ "kind": "method",
462
+ "name": "zoomIn",
463
+ "privacy": "public",
464
+ "description": "Zoom the canvas in"
465
+ },
466
+ {
467
+ "kind": "method",
468
+ "name": "zoomOut",
469
+ "privacy": "public",
470
+ "description": "Zoom the canvas out"
471
+ },
472
+ {
473
+ "kind": "method",
474
+ "name": "zoomReset",
475
+ "privacy": "public",
476
+ "description": "Reset the zoom of the canvas"
477
+ },
478
+ {
479
+ "kind": "method",
480
+ "name": "getModel",
481
+ "description": "Exports the current model design",
482
+ "return": {
483
+ "type": {
484
+ "text": ""
485
+ }
486
+ }
487
+ }
488
+ ],
489
+ "attributes": [
490
+ {
491
+ "name": "state",
492
+ "type": {
493
+ "text": "string"
494
+ },
495
+ "description": "Stores the state of the model editor as a json string",
496
+ "fieldName": "state"
497
+ },
498
+ {
499
+ "name": "featureWidgetId",
500
+ "type": {
501
+ "text": "string"
502
+ },
503
+ "description": "Stores the reference id of the widget where the dataset is used from",
504
+ "fieldName": "featureWidgetId"
505
+ },
506
+ {
507
+ "name": "editMode",
508
+ "type": {
509
+ "text": "\"edit\"|\"layer\"|\"read\"|\"hidden\""
510
+ },
511
+ "default": "\"edit\"",
512
+ "description": "What students will be able to edit in the explorable. Ranging from \"edit\" = everything, \"layer\" = only layer settings, \"read\" = read only, to \"hidden\" = invisible to the students.",
513
+ "fieldName": "editMode"
514
+ },
515
+ {
516
+ "name": "maxModelParameters",
517
+ "type": {
518
+ "text": "number"
519
+ },
520
+ "default": "100000",
521
+ "description": "The maximum number of total parameters allowed for training the model. Only checked by the training widget.",
522
+ "fieldName": "maxModelParameters"
523
+ },
524
+ {
525
+ "name": "maxLayerParameters",
526
+ "type": {
527
+ "text": "number"
528
+ },
529
+ "default": "10000",
530
+ "description": "The maximum number of parameters allowed per layer to allow training the model.",
531
+ "fieldName": "maxLayerParameters"
532
+ }
533
+ ],
534
+ "superclass": {
535
+ "name": "LitElementWw",
536
+ "package": "@webwriter/lit"
537
+ },
538
+ "tagName": "webwriter-model-designing",
539
+ "customElement": true,
540
+ "modulePath": "widgets/webwriter-model-designing.ts",
541
+ "definitionPath": "widgets/webwriter-model-designing.ts"
542
+ }
543
+ ],
544
+ "exports": [
545
+ {
546
+ "kind": "js",
547
+ "name": "AiWidgetsDesigns",
548
+ "declaration": {
549
+ "name": "AiWidgetsDesigns",
550
+ "module": "widgets/webwriter-model-designing.ts"
551
+ }
552
+ },
553
+ {
554
+ "kind": "custom-element-definition",
555
+ "name": "webwriter-model-designing",
556
+ "declaration": {
557
+ "name": "AiWidgetsDesigns",
558
+ "module": "widgets/webwriter-model-designing.ts"
559
+ }
560
+ }
561
+ ]
562
+ },
563
+ {
564
+ "kind": "javascript-module",
565
+ "path": "widgets/webwriter-model-evaluation.ts",
566
+ "declarations": [
567
+ {
568
+ "kind": "class",
569
+ "description": "A widget that allows evaluating a trained model using various tests.",
570
+ "name": "AiWidgetsTest",
571
+ "members": [
572
+ {
573
+ "kind": "field",
574
+ "name": "localize",
575
+ "privacy": "protected",
576
+ "default": "LOCALIZE"
577
+ },
578
+ {
579
+ "kind": "field",
580
+ "name": "featureWidgetId",
581
+ "type": {
582
+ "text": "string"
583
+ },
584
+ "description": "The id of the feature engineering widget to use as feature source.",
585
+ "attribute": "featureWidgetId",
586
+ "reflects": true
587
+ },
588
+ {
589
+ "kind": "field",
590
+ "name": "featureSelect",
591
+ "type": {
592
+ "text": "AiWidgetsReferenceSelect"
593
+ },
594
+ "privacy": "private"
595
+ },
596
+ {
597
+ "kind": "field",
598
+ "name": "modelWidgetId",
599
+ "type": {
600
+ "text": "string"
601
+ },
602
+ "description": "The id of the model training widget to use as model source.",
603
+ "attribute": "modelWidgetId",
604
+ "reflects": true
605
+ },
606
+ {
607
+ "kind": "field",
608
+ "name": "modelSelect",
609
+ "type": {
610
+ "text": "AiWidgetsReferenceSelect"
611
+ },
612
+ "privacy": "private"
613
+ },
614
+ {
615
+ "kind": "field",
616
+ "name": "modelName",
617
+ "type": {
618
+ "text": "SlSelect"
619
+ },
620
+ "privacy": "private"
621
+ },
622
+ {
623
+ "kind": "field",
624
+ "name": "testSelect",
625
+ "type": {
626
+ "text": "SlSelect"
627
+ },
628
+ "privacy": "private"
629
+ },
630
+ {
631
+ "kind": "field",
632
+ "name": "testContainer",
633
+ "type": {
634
+ "text": "HTMLDivElement"
635
+ },
636
+ "privacy": "private"
637
+ },
638
+ {
639
+ "kind": "field",
640
+ "name": "testElem",
641
+ "type": {
642
+ "text": "TemplateResult"
643
+ },
644
+ "privacy": "private"
645
+ },
646
+ {
647
+ "kind": "field",
648
+ "name": "selectedModelName",
649
+ "type": {
650
+ "text": "string"
651
+ },
652
+ "privacy": "private",
653
+ "attribute": "selectedModelName",
654
+ "reflects": true
655
+ },
656
+ {
657
+ "kind": "field",
658
+ "name": "model",
659
+ "type": {
660
+ "text": "TF.LayersModel"
661
+ },
662
+ "privacy": "private"
663
+ },
664
+ {
665
+ "kind": "method",
666
+ "name": "getModelSelect",
667
+ "description": "Renders the model select field allowing the user to change the model checkpoint that is used for testing."
668
+ },
669
+ {
670
+ "kind": "method",
671
+ "name": "modelRefChange",
672
+ "privacy": "private",
673
+ "parameters": [
674
+ {
675
+ "name": "e",
676
+ "type": {
677
+ "text": "CustomEvent"
678
+ }
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ "kind": "method",
684
+ "name": "featureRefChange",
685
+ "privacy": "private",
686
+ "parameters": [
687
+ {
688
+ "name": "e",
689
+ "type": {
690
+ "text": "CustomEvent"
691
+ }
692
+ }
693
+ ]
694
+ },
695
+ {
696
+ "kind": "method",
697
+ "name": "selectedModelChange",
698
+ "privacy": "private"
699
+ },
700
+ {
701
+ "kind": "method",
702
+ "name": "testChange",
703
+ "privacy": "private",
704
+ "description": "Renders the test results when the test changes."
705
+ }
706
+ ],
707
+ "attributes": [
708
+ {
709
+ "name": "featureWidgetId",
710
+ "type": {
711
+ "text": "string"
712
+ },
713
+ "description": "The id of the feature engineering widget to use as feature source.",
714
+ "fieldName": "featureWidgetId"
715
+ },
716
+ {
717
+ "name": "modelWidgetId",
718
+ "type": {
719
+ "text": "string"
720
+ },
721
+ "description": "The id of the model training widget to use as model source.",
722
+ "fieldName": "modelWidgetId"
723
+ },
724
+ {
725
+ "name": "selectedModelName",
726
+ "type": {
727
+ "text": "string"
728
+ },
729
+ "fieldName": "selectedModelName"
730
+ }
731
+ ],
732
+ "superclass": {
733
+ "name": "LitElementWw",
734
+ "package": "@webwriter/lit"
735
+ },
736
+ "tagName": "webwriter-model-evaluation",
737
+ "customElement": true,
738
+ "modulePath": "widgets/webwriter-model-evaluation.ts",
739
+ "definitionPath": "widgets/webwriter-model-evaluation.ts"
740
+ }
741
+ ],
742
+ "exports": [
743
+ {
744
+ "kind": "js",
745
+ "name": "AiWidgetsTest",
746
+ "declaration": {
747
+ "name": "AiWidgetsTest",
748
+ "module": "widgets/webwriter-model-evaluation.ts"
749
+ }
750
+ },
751
+ {
752
+ "kind": "custom-element-definition",
753
+ "name": "webwriter-model-evaluation",
754
+ "declaration": {
755
+ "name": "AiWidgetsTest",
756
+ "module": "widgets/webwriter-model-evaluation.ts"
757
+ }
758
+ }
759
+ ]
760
+ },
761
+ {
762
+ "kind": "javascript-module",
763
+ "path": "widgets/webwriter-model-prediction.ts",
764
+ "declarations": [
765
+ {
766
+ "kind": "class",
767
+ "description": "A widget to run inference using a trained model and features created in the feature engineering widget.",
768
+ "name": "AiWidgetsInference",
769
+ "members": [
770
+ {
771
+ "kind": "field",
772
+ "name": "localize",
773
+ "privacy": "protected",
774
+ "default": "LOCALIZE"
775
+ },
776
+ {
777
+ "kind": "field",
778
+ "name": "featureWidgetId",
779
+ "type": {
780
+ "text": "string"
781
+ },
782
+ "description": "The id of the feature engineering widget to use as input.",
783
+ "attribute": "featureWidgetId",
784
+ "reflects": true
785
+ },
786
+ {
787
+ "kind": "field",
788
+ "name": "featureSelect",
789
+ "type": {
790
+ "text": "AiWidgetsReferenceSelect"
791
+ },
792
+ "privacy": "private"
793
+ },
794
+ {
795
+ "kind": "field",
796
+ "name": "modelWidgetId",
797
+ "type": {
798
+ "text": "string"
799
+ },
800
+ "description": "The id of the model training widget to use as model source.",
801
+ "attribute": "modelWidgetId",
802
+ "reflects": true
803
+ },
804
+ {
805
+ "kind": "field",
806
+ "name": "modelSelect",
807
+ "type": {
808
+ "text": "AiWidgetsReferenceSelect"
809
+ },
810
+ "privacy": "private"
811
+ },
812
+ {
813
+ "kind": "field",
814
+ "name": "modelName",
815
+ "type": {
816
+ "text": "SlSelect"
817
+ },
818
+ "privacy": "private"
819
+ },
820
+ {
821
+ "kind": "field",
822
+ "name": "selectedModelName",
823
+ "type": {
824
+ "text": "string"
825
+ },
826
+ "privacy": "private",
827
+ "attribute": "selectedModelName",
828
+ "reflects": true
829
+ },
830
+ {
831
+ "kind": "field",
832
+ "name": "model",
833
+ "type": {
834
+ "text": "TF.LayersModel"
835
+ },
836
+ "privacy": "private"
837
+ },
838
+ {
839
+ "kind": "field",
840
+ "name": "predictionInterval",
841
+ "type": {
842
+ "text": "number"
843
+ },
844
+ "privacy": "private",
845
+ "default": "setInterval(function() { that.predict(); }, 200) as unknown"
846
+ },
847
+ {
848
+ "kind": "method",
849
+ "name": "getModelSelect",
850
+ "privacy": "private",
851
+ "description": "Renders the model select field allowing the user to change the model checkpoint that is used for inference."
852
+ },
853
+ {
854
+ "kind": "method",
855
+ "name": "getFeatureInputs",
856
+ "privacy": "private",
857
+ "description": "Renders the left input fields which the user can edit and which values are fed into the model periodically."
858
+ },
859
+ {
860
+ "kind": "method",
861
+ "name": "getFeatureOutputs",
862
+ "privacy": "private",
863
+ "description": "Renders the right output fields which are generated by the model output periodically."
864
+ },
865
+ {
866
+ "kind": "method",
867
+ "name": "modelRefChange",
868
+ "privacy": "private",
869
+ "parameters": [
870
+ {
871
+ "name": "e",
872
+ "type": {
873
+ "text": "CustomEvent"
874
+ }
875
+ }
876
+ ]
877
+ },
878
+ {
879
+ "kind": "method",
880
+ "name": "featureRefChange",
881
+ "privacy": "private",
882
+ "parameters": [
883
+ {
884
+ "name": "e",
885
+ "type": {
886
+ "text": "CustomEvent"
887
+ }
888
+ }
889
+ ]
890
+ },
891
+ {
892
+ "kind": "method",
893
+ "name": "selectedModelChange",
894
+ "privacy": "private"
895
+ },
896
+ {
897
+ "kind": "method",
898
+ "name": "fillWithRandomSample",
899
+ "privacy": "private"
900
+ },
901
+ {
902
+ "kind": "method",
903
+ "name": "fillWithSample",
904
+ "privacy": "private",
905
+ "parameters": [
906
+ {
907
+ "name": "id",
908
+ "type": {
909
+ "text": "number"
910
+ },
911
+ "description": "The id of the sample in the dataset."
912
+ }
913
+ ],
914
+ "description": "Sets the state of the input fields to the value of a sample."
915
+ },
916
+ {
917
+ "kind": "method",
918
+ "name": "predict",
919
+ "privacy": "private",
920
+ "description": "Is periodically called and will invoke the input fields values on the model to update the output fields."
921
+ }
922
+ ],
923
+ "attributes": [
924
+ {
925
+ "name": "featureWidgetId",
926
+ "type": {
927
+ "text": "string"
928
+ },
929
+ "description": "The id of the feature engineering widget to use as input.",
930
+ "fieldName": "featureWidgetId"
931
+ },
932
+ {
933
+ "name": "modelWidgetId",
934
+ "type": {
935
+ "text": "string"
936
+ },
937
+ "description": "The id of the model training widget to use as model source.",
938
+ "fieldName": "modelWidgetId"
939
+ },
940
+ {
941
+ "name": "selectedModelName",
942
+ "type": {
943
+ "text": "string"
944
+ },
945
+ "fieldName": "selectedModelName"
946
+ }
947
+ ],
948
+ "superclass": {
949
+ "name": "LitElementWw",
950
+ "package": "@webwriter/lit"
951
+ },
952
+ "tagName": "webwriter-model-prediction",
953
+ "customElement": true,
954
+ "modulePath": "widgets/webwriter-model-prediction.ts",
955
+ "definitionPath": "widgets/webwriter-model-prediction.ts"
956
+ }
957
+ ],
958
+ "exports": [
959
+ {
960
+ "kind": "js",
961
+ "name": "AiWidgetsInference",
962
+ "declaration": {
963
+ "name": "AiWidgetsInference",
964
+ "module": "widgets/webwriter-model-prediction.ts"
965
+ }
966
+ },
967
+ {
968
+ "kind": "custom-element-definition",
969
+ "name": "webwriter-model-prediction",
970
+ "declaration": {
971
+ "name": "AiWidgetsInference",
972
+ "module": "widgets/webwriter-model-prediction.ts"
973
+ }
974
+ }
975
+ ]
976
+ },
977
+ {
978
+ "kind": "javascript-module",
979
+ "path": "widgets/webwriter-model-training.ts",
980
+ "declarations": [
981
+ {
982
+ "kind": "class",
983
+ "description": "A widget to train models designed in the model designing widget using datasets created in the feature engineering widget.",
984
+ "name": "AiWidgetsTraining",
985
+ "members": [
986
+ {
987
+ "kind": "field",
988
+ "name": "localize",
989
+ "privacy": "protected",
990
+ "default": "LOCALIZE"
991
+ },
992
+ {
993
+ "kind": "field",
994
+ "name": "featureWidgetId",
995
+ "type": {
996
+ "text": "string"
997
+ },
998
+ "description": "The feature engineering widget to use as data source for training the model.",
999
+ "attribute": "featureWidgetId",
1000
+ "reflects": true
1001
+ },
1002
+ {
1003
+ "kind": "field",
1004
+ "name": "featureSelect",
1005
+ "privacy": "private"
1006
+ },
1007
+ {
1008
+ "kind": "field",
1009
+ "name": "modelWidgetId",
1010
+ "type": {
1011
+ "text": "string"
1012
+ },
1013
+ "description": "The model design widget to use as model source for training.",
1014
+ "attribute": "modelWidgetId",
1015
+ "reflects": true
1016
+ },
1017
+ {
1018
+ "kind": "field",
1019
+ "name": "modelSelect",
1020
+ "privacy": "private"
1021
+ },
1022
+ {
1023
+ "kind": "field",
1024
+ "name": "startTrainingBtn",
1025
+ "privacy": "private"
1026
+ },
1027
+ {
1028
+ "kind": "field",
1029
+ "name": "resetTrainingBtn",
1030
+ "privacy": "private"
1031
+ },
1032
+ {
1033
+ "kind": "field",
1034
+ "name": "trainingMetricsDiv",
1035
+ "privacy": "private"
1036
+ },
1037
+ {
1038
+ "kind": "field",
1039
+ "name": "speed",
1040
+ "type": {
1041
+ "text": "HTMLSpanElement"
1042
+ },
1043
+ "privacy": "private"
1044
+ },
1045
+ {
1046
+ "kind": "field",
1047
+ "name": "memory",
1048
+ "type": {
1049
+ "text": "HTMLSpanElement"
1050
+ },
1051
+ "privacy": "private"
1052
+ },
1053
+ {
1054
+ "kind": "field",
1055
+ "name": "error",
1056
+ "type": {
1057
+ "text": "HTMLSpanElement"
1058
+ },
1059
+ "privacy": "private"
1060
+ },
1061
+ {
1062
+ "kind": "field",
1063
+ "name": "cache",
1064
+ "type": {
1065
+ "text": "boolean"
1066
+ },
1067
+ "description": "If true, the transformed training samples will be cached for faster training.",
1068
+ "attribute": "cache",
1069
+ "reflects": true
1070
+ },
1071
+ {
1072
+ "kind": "field",
1073
+ "name": "currentBackend",
1074
+ "type": {
1075
+ "text": "\"webgl\" | \"cpu\""
1076
+ },
1077
+ "default": "\"webgl\"",
1078
+ "description": "The prefered tfjs backend",
1079
+ "attribute": "currentBackend",
1080
+ "reflects": true
1081
+ },
1082
+ {
1083
+ "kind": "field",
1084
+ "name": "modelVersions",
1085
+ "type": {
1086
+ "text": "Record<string, string>"
1087
+ },
1088
+ "default": "{}",
1089
+ "description": "Stores the model jsons with a name like \"best\" or \"epoch-20\" for loading by the inference and test widgets",
1090
+ "attribute": "modelVersions",
1091
+ "reflects": true
1092
+ },
1093
+ {
1094
+ "kind": "field",
1095
+ "name": "editMode",
1096
+ "type": {
1097
+ "text": "\"edit\"|\"hidden\""
1098
+ },
1099
+ "default": "\"edit\"",
1100
+ "description": "\"edit\" means that students can use the widget to train a model while \"hidden\" means the widget will be invisible to student but the trained models can be used by other widgets.",
1101
+ "attribute": "editMode",
1102
+ "reflects": true
1103
+ },
1104
+ {
1105
+ "kind": "field",
1106
+ "name": "optimizer",
1107
+ "type": {
1108
+ "text": "SlSelect"
1109
+ },
1110
+ "privacy": "private"
1111
+ },
1112
+ {
1113
+ "kind": "field",
1114
+ "name": "lr",
1115
+ "type": {
1116
+ "text": "SlInput"
1117
+ },
1118
+ "privacy": "private"
1119
+ },
1120
+ {
1121
+ "kind": "field",
1122
+ "name": "momentum",
1123
+ "type": {
1124
+ "text": "SlInput"
1125
+ },
1126
+ "privacy": "private"
1127
+ },
1128
+ {
1129
+ "kind": "field",
1130
+ "name": "batch",
1131
+ "type": {
1132
+ "text": "SlInput"
1133
+ },
1134
+ "privacy": "private"
1135
+ },
1136
+ {
1137
+ "kind": "field",
1138
+ "name": "epochs",
1139
+ "type": {
1140
+ "text": "SlInput"
1141
+ },
1142
+ "privacy": "private"
1143
+ },
1144
+ {
1145
+ "kind": "method",
1146
+ "name": "showError",
1147
+ "privacy": "private",
1148
+ "parameters": [
1149
+ {
1150
+ "name": "err",
1151
+ "type": {
1152
+ "text": "string"
1153
+ }
1154
+ }
1155
+ ]
1156
+ },
1157
+ {
1158
+ "kind": "method",
1159
+ "name": "hideError",
1160
+ "privacy": "private"
1161
+ },
1162
+ {
1163
+ "kind": "method",
1164
+ "name": "changeOptimizer",
1165
+ "privacy": "private"
1166
+ },
1167
+ {
1168
+ "kind": "method",
1169
+ "name": "setHyperParamsActive",
1170
+ "privacy": "private",
1171
+ "parameters": [
1172
+ {
1173
+ "name": "active",
1174
+ "type": {
1175
+ "text": "boolean"
1176
+ }
1177
+ }
1178
+ ]
1179
+ },
1180
+ {
1181
+ "kind": "field",
1182
+ "name": "chartContainer",
1183
+ "privacy": "private"
1184
+ },
1185
+ {
1186
+ "kind": "field",
1187
+ "name": "losses",
1188
+ "type": {
1189
+ "text": "Record<string, Array<number>>"
1190
+ },
1191
+ "privacy": "private",
1192
+ "default": "{}"
1193
+ },
1194
+ {
1195
+ "kind": "field",
1196
+ "name": "insights",
1197
+ "type": {
1198
+ "text": "Record<string, any>"
1199
+ },
1200
+ "privacy": "private",
1201
+ "default": "{min_val_loss: 100, min_val_loss_index: 0}"
1202
+ },
1203
+ {
1204
+ "kind": "field",
1205
+ "name": "chart",
1206
+ "privacy": "private",
1207
+ "default": "new ApexCharts(this.chartContainer, { series: [], chart: { id: 'realtime', height: 200, type: 'line', animations: { enabled: false }, toolbar: { show: false }, zoom: { enabled: false } }, dataLabels: { enabled: false }, title: { text: 'Training Metrics', align: 'left' }, markers: { size: 0 }, xaxis: { type: 'number', labels: { rotate: -90, tickAmount: 10, hideOverlappingLabels: true, step: 5 } }, yaxis: { min: 0 }, legend: { show: false }, })"
1208
+ },
1209
+ {
1210
+ "kind": "method",
1211
+ "name": "resolveOutput",
1212
+ "return": {
1213
+ "type": {
1214
+ "text": ""
1215
+ }
1216
+ },
1217
+ "parameters": [
1218
+ {
1219
+ "name": "layer",
1220
+ "type": {
1221
+ "text": "Layer"
1222
+ },
1223
+ "description": "One output layer of the model to solve the dependencies for."
1224
+ },
1225
+ {
1226
+ "name": "inputs",
1227
+ "type": {
1228
+ "text": "Record<string, TF.SymbolicTensor>"
1229
+ },
1230
+ "description": "All the input tensors of the model with the \"in_<feature>\"\" as the key."
1231
+ },
1232
+ {
1233
+ "name": "resolvedLayers",
1234
+ "type": {
1235
+ "text": "Record<number, any>"
1236
+ },
1237
+ "description": "A reference to an array storing the already resolved layers for later use when solving for other output layers."
1238
+ }
1239
+ ],
1240
+ "description": "Used to recursively connect the inputs via the layers to the output nodes."
1241
+ },
1242
+ {
1243
+ "kind": "method",
1244
+ "name": "buildModel",
1245
+ "description": "Builds the complete tfjs model using the layers from the model design widget. It sets the correct input names for the input layers as \"in_<feature>\". The output layers dependency graph is build and the loss is applied to the output tensor for training.",
1246
+ "return": {
1247
+ "type": {
1248
+ "text": ""
1249
+ }
1250
+ }
1251
+ },
1252
+ {
1253
+ "kind": "method",
1254
+ "name": "lossStringToFunction",
1255
+ "parameters": [
1256
+ {
1257
+ "name": "loss",
1258
+ "type": {
1259
+ "text": "string"
1260
+ },
1261
+ "description": "The loss string like \"MSE\" or \"BCE\""
1262
+ }
1263
+ ],
1264
+ "description": "Converts a loss string to the corresponding tfjs loss function.",
1265
+ "return": {
1266
+ "type": {
1267
+ "text": ""
1268
+ }
1269
+ }
1270
+ },
1271
+ {
1272
+ "kind": "method",
1273
+ "name": "updateGraph",
1274
+ "privacy": "private"
1275
+ },
1276
+ {
1277
+ "kind": "method",
1278
+ "name": "getModel",
1279
+ "privacy": "public",
1280
+ "parameters": [
1281
+ {
1282
+ "name": "name",
1283
+ "description": "The checkpoint name like \"best\" or \"epoch-20\". All the available checkpoints can be retrieved via this.getAvailableModels()."
1284
+ }
1285
+ ],
1286
+ "description": "Returns the model for named checkpoints for other widgets to use.",
1287
+ "return": {
1288
+ "type": {
1289
+ "text": ""
1290
+ }
1291
+ }
1292
+ },
1293
+ {
1294
+ "kind": "method",
1295
+ "name": "getAvailableModels",
1296
+ "privacy": "public",
1297
+ "description": "Returns the available model checkpoints"
1298
+ },
1299
+ {
1300
+ "kind": "method",
1301
+ "name": "clearModels",
1302
+ "privacy": "private",
1303
+ "description": "Deletes all model checkpoints"
1304
+ },
1305
+ {
1306
+ "kind": "field",
1307
+ "name": "isTraining",
1308
+ "type": {
1309
+ "text": "boolean"
1310
+ },
1311
+ "privacy": "private",
1312
+ "default": "false",
1313
+ "description": "Is true, while tf is in the training process"
1314
+ },
1315
+ {
1316
+ "kind": "field",
1317
+ "name": "currentTraining",
1318
+ "type": {
1319
+ "text": "TF.LayersModel"
1320
+ },
1321
+ "privacy": "private",
1322
+ "description": "contains the currently trained model"
1323
+ },
1324
+ {
1325
+ "kind": "field",
1326
+ "name": "currentEpoch",
1327
+ "type": {
1328
+ "text": "number"
1329
+ },
1330
+ "privacy": "private",
1331
+ "default": "0"
1332
+ },
1333
+ {
1334
+ "kind": "field",
1335
+ "name": "backendPriority",
1336
+ "type": {
1337
+ "text": "array"
1338
+ },
1339
+ "privacy": "private",
1340
+ "default": "[\"webgl\",\"cpu\"]",
1341
+ "description": "A list of available backends for tf to use. Could be expanded and are tried out in order. (Not all backends support all layer and operation types, but can provide better training speed)"
1342
+ },
1343
+ {
1344
+ "kind": "method",
1345
+ "name": "resetModel",
1346
+ "privacy": "private",
1347
+ "description": "Sets the state of this training widget back to the initial configuration and deletes previous training progress."
1348
+ },
1349
+ {
1350
+ "kind": "method",
1351
+ "name": "initModel",
1352
+ "description": "Initializes the model for training and preps the UI."
1353
+ },
1354
+ {
1355
+ "kind": "method",
1356
+ "name": "training",
1357
+ "description": "Runs the tf training loop and keeps the UI up-to-date"
1358
+ },
1359
+ {
1360
+ "kind": "method",
1361
+ "name": "saveCurrentModel",
1362
+ "parameters": [
1363
+ {
1364
+ "name": "name",
1365
+ "description": "The checkpoint name."
1366
+ }
1367
+ ],
1368
+ "description": "Saves the current model as a checkpoint for other widgets to use later."
1369
+ }
1370
+ ],
1371
+ "events": [
1372
+ {
1373
+ "name": "finished",
1374
+ "type": {
1375
+ "text": "CustomEvent"
1376
+ },
1377
+ "description": "Fired when the training process has finished."
1378
+ },
1379
+ {
1380
+ "name": "epoch",
1381
+ "type": {
1382
+ "text": "CustomEvent"
1383
+ },
1384
+ "description": "Fired after each epoch during training."
1385
+ }
1386
+ ],
1387
+ "attributes": [
1388
+ {
1389
+ "name": "featureWidgetId",
1390
+ "type": {
1391
+ "text": "string"
1392
+ },
1393
+ "description": "The feature engineering widget to use as data source for training the model.",
1394
+ "fieldName": "featureWidgetId"
1395
+ },
1396
+ {
1397
+ "name": "modelWidgetId",
1398
+ "type": {
1399
+ "text": "string"
1400
+ },
1401
+ "description": "The model design widget to use as model source for training.",
1402
+ "fieldName": "modelWidgetId"
1403
+ },
1404
+ {
1405
+ "name": "cache",
1406
+ "type": {
1407
+ "text": "boolean"
1408
+ },
1409
+ "description": "If true, the transformed training samples will be cached for faster training.",
1410
+ "fieldName": "cache"
1411
+ },
1412
+ {
1413
+ "name": "currentBackend",
1414
+ "type": {
1415
+ "text": "\"webgl\" | \"cpu\""
1416
+ },
1417
+ "default": "\"webgl\"",
1418
+ "description": "The prefered tfjs backend",
1419
+ "fieldName": "currentBackend"
1420
+ },
1421
+ {
1422
+ "name": "modelVersions",
1423
+ "type": {
1424
+ "text": "Record<string, string>"
1425
+ },
1426
+ "default": "{}",
1427
+ "description": "Stores the model jsons with a name like \"best\" or \"epoch-20\" for loading by the inference and test widgets",
1428
+ "fieldName": "modelVersions"
1429
+ },
1430
+ {
1431
+ "name": "editMode",
1432
+ "type": {
1433
+ "text": "\"edit\"|\"hidden\""
1434
+ },
1435
+ "default": "\"edit\"",
1436
+ "description": "\"edit\" means that students can use the widget to train a model while \"hidden\" means the widget will be invisible to student but the trained models can be used by other widgets.",
1437
+ "fieldName": "editMode"
1438
+ }
1439
+ ],
1440
+ "superclass": {
1441
+ "name": "LitElementWw",
1442
+ "package": "@webwriter/lit"
1443
+ },
1444
+ "tagName": "webwriter-model-training",
1445
+ "customElement": true,
1446
+ "modulePath": "widgets/webwriter-model-training.ts",
1447
+ "definitionPath": "widgets/webwriter-model-training.ts"
1448
+ }
1449
+ ],
1450
+ "exports": [
1451
+ {
1452
+ "kind": "js",
1453
+ "name": "AiWidgetsTraining",
1454
+ "declaration": {
1455
+ "name": "AiWidgetsTraining",
1456
+ "module": "widgets/webwriter-model-training.ts"
1457
+ }
1458
+ },
1459
+ {
1460
+ "kind": "custom-element-definition",
1461
+ "name": "webwriter-model-training",
1462
+ "declaration": {
1463
+ "name": "AiWidgetsTraining",
1464
+ "module": "widgets/webwriter-model-training.ts"
1465
+ }
1466
+ }
1467
+ ]
1468
+ }
1469
+ ]
1470
+ }