@memberjunction/predictive-studio 6.2.2 → 6.3.0-edge.1

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 (391) hide show
  1. package/README.md +16 -11
  2. package/dist/actions/base-predictive-studio.action.d.ts +7 -0
  3. package/dist/actions/base-predictive-studio.action.d.ts.map +1 -1
  4. package/dist/actions/base-predictive-studio.action.js +22 -0
  5. package/dist/actions/base-predictive-studio.action.js.map +1 -1
  6. package/dist/actions/driver-classes.d.ts +2 -0
  7. package/dist/actions/driver-classes.d.ts.map +1 -1
  8. package/dist/actions/driver-classes.js +2 -0
  9. package/dist/actions/driver-classes.js.map +1 -1
  10. package/dist/actions/evaluate-drift.action.d.ts +100 -0
  11. package/dist/actions/evaluate-drift.action.d.ts.map +1 -0
  12. package/dist/actions/evaluate-drift.action.js +512 -0
  13. package/dist/actions/evaluate-drift.action.js.map +1 -0
  14. package/dist/actions/index.d.ts +3 -0
  15. package/dist/actions/index.d.ts.map +1 -1
  16. package/dist/actions/index.js +7 -0
  17. package/dist/actions/index.js.map +1 -1
  18. package/dist/actions/migrate-pipelines.action.d.ts +19 -0
  19. package/dist/actions/migrate-pipelines.action.d.ts.map +1 -0
  20. package/dist/actions/migrate-pipelines.action.js +51 -0
  21. package/dist/actions/migrate-pipelines.action.js.map +1 -0
  22. package/dist/actions/promote-model.action.d.ts +12 -1
  23. package/dist/actions/promote-model.action.d.ts.map +1 -1
  24. package/dist/actions/promote-model.action.js +7 -2
  25. package/dist/actions/promote-model.action.js.map +1 -1
  26. package/dist/actions/promote-model.gate.d.ts +31 -2
  27. package/dist/actions/promote-model.gate.d.ts.map +1 -1
  28. package/dist/actions/promote-model.gate.js +84 -5
  29. package/dist/actions/promote-model.gate.js.map +1 -1
  30. package/dist/actions/run-experiment.action.d.ts.map +1 -1
  31. package/dist/actions/run-experiment.action.js +5 -4
  32. package/dist/actions/run-experiment.action.js.map +1 -1
  33. package/dist/actions/schedule-model-scoring.action.js +2 -2
  34. package/dist/actions/schedule-model-scoring.action.js.map +1 -1
  35. package/dist/actions/score-record-set.action.js +1 -1
  36. package/dist/actions/score-record-set.action.js.map +1 -1
  37. package/dist/actions/score-record-set.runner.d.ts +2 -2
  38. package/dist/actions/score-record-set.runner.js +3 -3
  39. package/dist/actions/score-record-set.runner.js.map +1 -1
  40. package/dist/actions/train-model.action.d.ts +28 -25
  41. package/dist/actions/train-model.action.d.ts.map +1 -1
  42. package/dist/actions/train-model.action.js +50 -39
  43. package/dist/actions/train-model.action.js.map +1 -1
  44. package/dist/agent/index.d.ts +1 -1
  45. package/dist/agent/index.js +1 -1
  46. package/dist/agent/modeling-plan-to-pipeline.d.ts +0 -2
  47. package/dist/agent/modeling-plan-to-pipeline.d.ts.map +1 -1
  48. package/dist/agent/modeling-plan-to-pipeline.js +30 -39
  49. package/dist/agent/modeling-plan-to-pipeline.js.map +1 -1
  50. package/dist/agent/pipeline-builder-agent.d.ts +47 -18
  51. package/dist/agent/pipeline-builder-agent.d.ts.map +1 -1
  52. package/dist/agent/pipeline-builder-agent.js +161 -92
  53. package/dist/agent/pipeline-builder-agent.js.map +1 -1
  54. package/dist/agent/pipeline-builder.d.ts +178 -56
  55. package/dist/agent/pipeline-builder.d.ts.map +1 -1
  56. package/dist/agent/pipeline-builder.js +333 -234
  57. package/dist/agent/pipeline-builder.js.map +1 -1
  58. package/dist/experiment/budget.d.ts +61 -0
  59. package/dist/experiment/budget.d.ts.map +1 -0
  60. package/dist/experiment/budget.js +72 -0
  61. package/dist/experiment/budget.js.map +1 -0
  62. package/dist/experiment/experiment-orchestrator.d.ts +43 -7
  63. package/dist/experiment/experiment-orchestrator.d.ts.map +1 -1
  64. package/dist/experiment/experiment-orchestrator.js +130 -33
  65. package/dist/experiment/experiment-orchestrator.js.map +1 -1
  66. package/dist/experiment/index.d.ts +2 -0
  67. package/dist/experiment/index.d.ts.map +1 -1
  68. package/dist/experiment/index.js +2 -0
  69. package/dist/experiment/index.js.map +1 -1
  70. package/dist/experiment/leaderboard.d.ts +15 -15
  71. package/dist/experiment/leaderboard.d.ts.map +1 -1
  72. package/dist/experiment/leaderboard.js +44 -18
  73. package/dist/experiment/leaderboard.js.map +1 -1
  74. package/dist/experiment/scores.d.ts +32 -0
  75. package/dist/experiment/scores.d.ts.map +1 -0
  76. package/dist/experiment/scores.js +62 -0
  77. package/dist/experiment/scores.js.map +1 -0
  78. package/dist/experiment/seams.d.ts +23 -20
  79. package/dist/experiment/seams.d.ts.map +1 -1
  80. package/dist/experiment/seams.js +54 -56
  81. package/dist/experiment/seams.js.map +1 -1
  82. package/dist/experiment/types.d.ts +55 -10
  83. package/dist/experiment/types.d.ts.map +1 -1
  84. package/dist/experiment/types.js.map +1 -1
  85. package/dist/feature-assembly/as-of/as-of-assembler.d.ts +412 -0
  86. package/dist/feature-assembly/as-of/as-of-assembler.d.ts.map +1 -0
  87. package/dist/feature-assembly/as-of/as-of-assembler.js +1239 -0
  88. package/dist/feature-assembly/as-of/as-of-assembler.js.map +1 -0
  89. package/dist/feature-assembly/as-of/feature-resolution.d.ts +84 -0
  90. package/dist/feature-assembly/as-of/feature-resolution.d.ts.map +1 -0
  91. package/dist/feature-assembly/as-of/feature-resolution.js +229 -0
  92. package/dist/feature-assembly/as-of/feature-resolution.js.map +1 -0
  93. package/dist/feature-assembly/as-of/index.d.ts +15 -0
  94. package/dist/feature-assembly/as-of/index.d.ts.map +1 -0
  95. package/dist/feature-assembly/as-of/index.js +15 -0
  96. package/dist/feature-assembly/as-of/index.js.map +1 -0
  97. package/dist/feature-assembly/as-of/read-by-keys.d.ts +30 -0
  98. package/dist/feature-assembly/as-of/read-by-keys.d.ts.map +1 -0
  99. package/dist/feature-assembly/as-of/read-by-keys.js +51 -0
  100. package/dist/feature-assembly/as-of/read-by-keys.js.map +1 -0
  101. package/dist/feature-assembly/as-of/record-history.d.ts +256 -0
  102. package/dist/feature-assembly/as-of/record-history.d.ts.map +1 -0
  103. package/dist/feature-assembly/as-of/record-history.js +505 -0
  104. package/dist/feature-assembly/as-of/record-history.js.map +1 -0
  105. package/dist/feature-assembly/as-of/refusal.d.ts +19 -0
  106. package/dist/feature-assembly/as-of/refusal.d.ts.map +1 -0
  107. package/dist/feature-assembly/as-of/refusal.js +13 -0
  108. package/dist/feature-assembly/as-of/refusal.js.map +1 -0
  109. package/dist/feature-assembly/as-of/series-features.d.ts +65 -0
  110. package/dist/feature-assembly/as-of/series-features.d.ts.map +1 -0
  111. package/dist/feature-assembly/as-of/series-features.js +97 -0
  112. package/dist/feature-assembly/as-of/series-features.js.map +1 -0
  113. package/dist/feature-assembly/as-of/windowed-aggregate.d.ts +36 -0
  114. package/dist/feature-assembly/as-of/windowed-aggregate.d.ts.map +1 -0
  115. package/dist/feature-assembly/as-of/windowed-aggregate.js +99 -0
  116. package/dist/feature-assembly/as-of/windowed-aggregate.js.map +1 -0
  117. package/dist/feature-assembly/as-of.d.ts +1 -9
  118. package/dist/feature-assembly/as-of.d.ts.map +1 -1
  119. package/dist/feature-assembly/as-of.js +2 -19
  120. package/dist/feature-assembly/as-of.js.map +1 -1
  121. package/dist/feature-assembly/assembly-metadata.d.ts +34 -0
  122. package/dist/feature-assembly/assembly-metadata.d.ts.map +1 -0
  123. package/dist/feature-assembly/assembly-metadata.js +26 -0
  124. package/dist/feature-assembly/assembly-metadata.js.map +1 -0
  125. package/dist/feature-assembly/data-access.d.ts +21 -2
  126. package/dist/feature-assembly/data-access.d.ts.map +1 -1
  127. package/dist/feature-assembly/data-access.js +14 -0
  128. package/dist/feature-assembly/data-access.js.map +1 -1
  129. package/dist/feature-assembly/feature-assembly-executor.d.ts.map +1 -1
  130. package/dist/feature-assembly/feature-assembly-executor.js +5 -2
  131. package/dist/feature-assembly/feature-assembly-executor.js.map +1 -1
  132. package/dist/feature-assembly/index.d.ts +3 -0
  133. package/dist/feature-assembly/index.d.ts.map +1 -1
  134. package/dist/feature-assembly/index.js +3 -0
  135. package/dist/feature-assembly/index.js.map +1 -1
  136. package/dist/feature-assembly/leakage-guard.d.ts +1 -1
  137. package/dist/feature-assembly/leakage-guard.js +1 -1
  138. package/dist/feature-assembly/read-policy.d.ts +27 -0
  139. package/dist/feature-assembly/read-policy.d.ts.map +1 -0
  140. package/dist/feature-assembly/read-policy.js +63 -0
  141. package/dist/feature-assembly/read-policy.js.map +1 -0
  142. package/dist/feature-pipelines/feature-pipeline-engine.d.ts.map +1 -1
  143. package/dist/feature-pipelines/feature-pipeline-engine.js +3 -1
  144. package/dist/feature-pipelines/feature-pipeline-engine.js.map +1 -1
  145. package/dist/index.d.ts +5 -2
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +16 -4
  148. package/dist/index.js.map +1 -1
  149. package/dist/maintenance/index.d.ts +1 -0
  150. package/dist/maintenance/index.d.ts.map +1 -1
  151. package/dist/maintenance/index.js +1 -0
  152. package/dist/maintenance/index.js.map +1 -1
  153. package/dist/maintenance/maintenance-engine.d.ts +16 -19
  154. package/dist/maintenance/maintenance-engine.d.ts.map +1 -1
  155. package/dist/maintenance/maintenance-engine.js +53 -53
  156. package/dist/maintenance/maintenance-engine.js.map +1 -1
  157. package/dist/maintenance/metrics.d.ts +19 -15
  158. package/dist/maintenance/metrics.d.ts.map +1 -1
  159. package/dist/maintenance/metrics.js +29 -24
  160. package/dist/maintenance/metrics.js.map +1 -1
  161. package/dist/maintenance/psi-drift-detector.d.ts +246 -0
  162. package/dist/maintenance/psi-drift-detector.d.ts.map +1 -0
  163. package/dist/maintenance/psi-drift-detector.js +1002 -0
  164. package/dist/maintenance/psi-drift-detector.js.map +1 -0
  165. package/dist/maintenance/types.d.ts +11 -2
  166. package/dist/maintenance/types.d.ts.map +1 -1
  167. package/dist/maintenance/types.js.map +1 -1
  168. package/dist/migration/index.d.ts +8 -0
  169. package/dist/migration/index.d.ts.map +1 -0
  170. package/dist/migration/index.js +8 -0
  171. package/dist/migration/index.js.map +1 -0
  172. package/dist/migration/legacy-pipeline-migration.d.ts +138 -0
  173. package/dist/migration/legacy-pipeline-migration.d.ts.map +1 -0
  174. package/dist/migration/legacy-pipeline-migration.js +273 -0
  175. package/dist/migration/legacy-pipeline-migration.js.map +1 -0
  176. package/dist/operations/delegation.d.ts +58 -46
  177. package/dist/operations/delegation.d.ts.map +1 -1
  178. package/dist/operations/delegation.js +90 -77
  179. package/dist/operations/delegation.js.map +1 -1
  180. package/dist/operations/promote-model.operation.d.ts +2 -2
  181. package/dist/operations/promote-model.operation.d.ts.map +1 -1
  182. package/dist/operations/promote-model.operation.js +6 -2
  183. package/dist/operations/promote-model.operation.js.map +1 -1
  184. package/dist/operations/refusals.d.ts +5 -0
  185. package/dist/operations/refusals.d.ts.map +1 -1
  186. package/dist/operations/refusals.js +26 -1
  187. package/dist/operations/refusals.js.map +1 -1
  188. package/dist/operations/start-experiment-session.operation.js +3 -3
  189. package/dist/operations/train-model.mapping.d.ts +91 -0
  190. package/dist/operations/train-model.mapping.d.ts.map +1 -0
  191. package/dist/operations/train-model.mapping.js +145 -0
  192. package/dist/operations/train-model.mapping.js.map +1 -0
  193. package/dist/operations/train-model.operation.d.ts +14 -9
  194. package/dist/operations/train-model.operation.d.ts.map +1 -1
  195. package/dist/operations/train-model.operation.js +30 -51
  196. package/dist/operations/train-model.operation.js.map +1 -1
  197. package/dist/prediction-unit/decision-date-advance.d.ts +46 -0
  198. package/dist/prediction-unit/decision-date-advance.d.ts.map +1 -0
  199. package/dist/prediction-unit/decision-date-advance.js +79 -0
  200. package/dist/prediction-unit/decision-date-advance.js.map +1 -0
  201. package/dist/prediction-unit/index.d.ts +12 -0
  202. package/dist/prediction-unit/index.d.ts.map +1 -0
  203. package/dist/prediction-unit/index.js +12 -0
  204. package/dist/prediction-unit/index.js.map +1 -0
  205. package/dist/prediction-unit/target-validation.d.ts +21 -0
  206. package/dist/prediction-unit/target-validation.d.ts.map +1 -0
  207. package/dist/prediction-unit/target-validation.js +54 -0
  208. package/dist/prediction-unit/target-validation.js.map +1 -0
  209. package/dist/prediction-unit/unit-row-reader.d.ts +108 -0
  210. package/dist/prediction-unit/unit-row-reader.d.ts.map +1 -0
  211. package/dist/prediction-unit/unit-row-reader.js +348 -0
  212. package/dist/prediction-unit/unit-row-reader.js.map +1 -0
  213. package/dist/prediction-unit/unit-store.d.ts +28 -0
  214. package/dist/prediction-unit/unit-store.d.ts.map +1 -0
  215. package/dist/prediction-unit/unit-store.js +41 -0
  216. package/dist/prediction-unit/unit-store.js.map +1 -0
  217. package/dist/prediction-unit/unit-versioning.d.ts +43 -0
  218. package/dist/prediction-unit/unit-versioning.d.ts.map +1 -0
  219. package/dist/prediction-unit/unit-versioning.js +71 -0
  220. package/dist/prediction-unit/unit-versioning.js.map +1 -0
  221. package/dist/protocol/index.d.ts +9 -0
  222. package/dist/protocol/index.d.ts.map +1 -0
  223. package/dist/protocol/index.js +9 -0
  224. package/dist/protocol/index.js.map +1 -0
  225. package/dist/protocol/protocol-defaults.d.ts +37 -0
  226. package/dist/protocol/protocol-defaults.d.ts.map +1 -0
  227. package/dist/protocol/protocol-defaults.js +59 -0
  228. package/dist/protocol/protocol-defaults.js.map +1 -0
  229. package/dist/protocol/protocol-versioning.d.ts +46 -0
  230. package/dist/protocol/protocol-versioning.d.ts.map +1 -0
  231. package/dist/protocol/protocol-versioning.js +48 -0
  232. package/dist/protocol/protocol-versioning.js.map +1 -0
  233. package/dist/protocol/search-guard.d.ts +45 -0
  234. package/dist/protocol/search-guard.d.ts.map +1 -0
  235. package/dist/protocol/search-guard.js +50 -0
  236. package/dist/protocol/search-guard.js.map +1 -0
  237. package/dist/scoring/artifact-loader.d.ts +5 -32
  238. package/dist/scoring/artifact-loader.d.ts.map +1 -1
  239. package/dist/scoring/artifact-loader.js +4 -59
  240. package/dist/scoring/artifact-loader.js.map +1 -1
  241. package/dist/scoring/auto-train.d.ts +25 -5
  242. package/dist/scoring/auto-train.d.ts.map +1 -1
  243. package/dist/scoring/auto-train.js +48 -31
  244. package/dist/scoring/auto-train.js.map +1 -1
  245. package/dist/scoring/index.d.ts +3 -0
  246. package/dist/scoring/index.d.ts.map +1 -1
  247. package/dist/scoring/index.js +3 -0
  248. package/dist/scoring/index.js.map +1 -1
  249. package/dist/scoring/ml-model-inference-processor.d.ts +137 -10
  250. package/dist/scoring/ml-model-inference-processor.d.ts.map +1 -1
  251. package/dist/scoring/ml-model-inference-processor.js +383 -40
  252. package/dist/scoring/ml-model-inference-processor.js.map +1 -1
  253. package/dist/scoring/model-readiness.d.ts +45 -0
  254. package/dist/scoring/model-readiness.d.ts.map +1 -1
  255. package/dist/scoring/model-readiness.js +49 -0
  256. package/dist/scoring/model-readiness.js.map +1 -1
  257. package/dist/scoring/register.d.ts +8 -3
  258. package/dist/scoring/register.d.ts.map +1 -1
  259. package/dist/scoring/register.js +28 -4
  260. package/dist/scoring/register.js.map +1 -1
  261. package/dist/scoring/seams.d.ts +18 -2
  262. package/dist/scoring/seams.d.ts.map +1 -1
  263. package/dist/scoring/seams.js +35 -10
  264. package/dist/scoring/seams.js.map +1 -1
  265. package/dist/scoring/shadow-scoring.d.ts +245 -0
  266. package/dist/scoring/shadow-scoring.d.ts.map +1 -0
  267. package/dist/scoring/shadow-scoring.js +510 -0
  268. package/dist/scoring/shadow-scoring.js.map +1 -0
  269. package/dist/scoring/startup-register.d.ts +3 -3
  270. package/dist/scoring/startup-register.d.ts.map +1 -1
  271. package/dist/scoring/startup-register.js +10 -4
  272. package/dist/scoring/startup-register.js.map +1 -1
  273. package/dist/scoring/storage-provider-artifact-loader.d.ts +14 -0
  274. package/dist/scoring/storage-provider-artifact-loader.d.ts.map +1 -0
  275. package/dist/scoring/storage-provider-artifact-loader.js +47 -0
  276. package/dist/scoring/storage-provider-artifact-loader.js.map +1 -0
  277. package/dist/scoring/training-keys.d.ts +27 -0
  278. package/dist/scoring/training-keys.d.ts.map +1 -0
  279. package/dist/scoring/training-keys.js +54 -0
  280. package/dist/scoring/training-keys.js.map +1 -0
  281. package/dist/scoring/types.d.ts +72 -7
  282. package/dist/scoring/types.d.ts.map +1 -1
  283. package/dist/scoring/types.js +4 -0
  284. package/dist/scoring/types.js.map +1 -1
  285. package/dist/sidecar-provider.d.ts +2 -2
  286. package/dist/sidecar-provider.js +3 -3
  287. package/dist/snapshot/code-version.d.ts +16 -0
  288. package/dist/snapshot/code-version.d.ts.map +1 -0
  289. package/dist/snapshot/code-version.js +39 -0
  290. package/dist/snapshot/code-version.js.map +1 -0
  291. package/dist/snapshot/holdout-carver.d.ts +110 -0
  292. package/dist/snapshot/holdout-carver.d.ts.map +1 -0
  293. package/dist/snapshot/holdout-carver.js +171 -0
  294. package/dist/snapshot/holdout-carver.js.map +1 -0
  295. package/dist/snapshot/index.d.ts +17 -0
  296. package/dist/snapshot/index.d.ts.map +1 -0
  297. package/dist/snapshot/index.js +17 -0
  298. package/dist/snapshot/index.js.map +1 -0
  299. package/dist/snapshot/snapshot-builder.d.ts +152 -0
  300. package/dist/snapshot/snapshot-builder.d.ts.map +1 -0
  301. package/dist/snapshot/snapshot-builder.js +286 -0
  302. package/dist/snapshot/snapshot-builder.js.map +1 -0
  303. package/dist/snapshot/snapshot-file-store.d.ts +161 -0
  304. package/dist/snapshot/snapshot-file-store.d.ts.map +1 -0
  305. package/dist/snapshot/snapshot-file-store.js +204 -0
  306. package/dist/snapshot/snapshot-file-store.js.map +1 -0
  307. package/dist/snapshot/snapshot-hash.d.ts +6 -0
  308. package/dist/snapshot/snapshot-hash.d.ts.map +1 -0
  309. package/dist/snapshot/snapshot-hash.js +16 -0
  310. package/dist/snapshot/snapshot-hash.js.map +1 -0
  311. package/dist/snapshot/snapshot-manifest.d.ts +43 -0
  312. package/dist/snapshot/snapshot-manifest.d.ts.map +1 -0
  313. package/dist/snapshot/snapshot-manifest.js +43 -0
  314. package/dist/snapshot/snapshot-manifest.js.map +1 -0
  315. package/dist/snapshot/snapshot-retrainer.d.ts +107 -0
  316. package/dist/snapshot/snapshot-retrainer.d.ts.map +1 -0
  317. package/dist/snapshot/snapshot-retrainer.js +194 -0
  318. package/dist/snapshot/snapshot-retrainer.js.map +1 -0
  319. package/dist/snapshot/snapshot-serialization.d.ts +99 -0
  320. package/dist/snapshot/snapshot-serialization.d.ts.map +1 -0
  321. package/dist/snapshot/snapshot-serialization.js +191 -0
  322. package/dist/snapshot/snapshot-serialization.js.map +1 -0
  323. package/dist/snapshot/training-snapshot-store.d.ts +38 -0
  324. package/dist/snapshot/training-snapshot-store.d.ts.map +1 -0
  325. package/dist/snapshot/training-snapshot-store.js +41 -0
  326. package/dist/snapshot/training-snapshot-store.js.map +1 -0
  327. package/dist/storage/ps-storage-provider.d.ts +108 -0
  328. package/dist/storage/ps-storage-provider.d.ts.map +1 -0
  329. package/dist/storage/ps-storage-provider.js +154 -0
  330. package/dist/storage/ps-storage-provider.js.map +1 -0
  331. package/dist/training/artifact-store.d.ts +12 -103
  332. package/dist/training/artifact-store.d.ts.map +1 -1
  333. package/dist/training/artifact-store.js +13 -137
  334. package/dist/training/artifact-store.js.map +1 -1
  335. package/dist/training/compute-cost.d.ts +23 -0
  336. package/dist/training/compute-cost.d.ts.map +1 -0
  337. package/dist/training/compute-cost.js +36 -0
  338. package/dist/training/compute-cost.js.map +1 -0
  339. package/dist/training/evaluation-protocol-store.d.ts +53 -0
  340. package/dist/training/evaluation-protocol-store.d.ts.map +1 -0
  341. package/dist/training/evaluation-protocol-store.js +54 -0
  342. package/dist/training/evaluation-protocol-store.js.map +1 -0
  343. package/dist/training/index.d.ts +9 -1
  344. package/dist/training/index.d.ts.map +1 -1
  345. package/dist/training/index.js +9 -1
  346. package/dist/training/index.js.map +1 -1
  347. package/dist/training/locked-holdout.d.ts +19 -4
  348. package/dist/training/locked-holdout.d.ts.map +1 -1
  349. package/dist/training/locked-holdout.js +29 -5
  350. package/dist/training/locked-holdout.js.map +1 -1
  351. package/dist/training/seams.d.ts +34 -8
  352. package/dist/training/seams.d.ts.map +1 -1
  353. package/dist/training/seams.js +74 -18
  354. package/dist/training/seams.js.map +1 -1
  355. package/dist/training/storage-provider-artifact-store.d.ts +49 -0
  356. package/dist/training/storage-provider-artifact-store.d.ts.map +1 -0
  357. package/dist/training/storage-provider-artifact-store.js +147 -0
  358. package/dist/training/storage-provider-artifact-store.js.map +1 -0
  359. package/dist/training/trainer-model-lineage.d.ts +32 -0
  360. package/dist/training/trainer-model-lineage.d.ts.map +1 -0
  361. package/dist/training/trainer-model-lineage.js +62 -0
  362. package/dist/training/trainer-model-lineage.js.map +1 -0
  363. package/dist/training/trainer-request.d.ts +50 -0
  364. package/dist/training/trainer-request.d.ts.map +1 -0
  365. package/dist/training/trainer-request.js +65 -0
  366. package/dist/training/trainer-request.js.map +1 -0
  367. package/dist/training/trainer-result.d.ts +30 -0
  368. package/dist/training/trainer-result.d.ts.map +1 -0
  369. package/dist/training/trainer-result.js +40 -0
  370. package/dist/training/trainer-result.js.map +1 -0
  371. package/dist/training/training-engine.d.ts +417 -64
  372. package/dist/training/training-engine.d.ts.map +1 -1
  373. package/dist/training/training-engine.js +869 -178
  374. package/dist/training/training-engine.js.map +1 -1
  375. package/dist/training/training-refusal.d.ts +15 -0
  376. package/dist/training/training-refusal.d.ts.map +1 -0
  377. package/dist/training/training-refusal.js +62 -0
  378. package/dist/training/training-refusal.js.map +1 -0
  379. package/dist/training/types.d.ts +133 -41
  380. package/dist/training/types.d.ts.map +1 -1
  381. package/dist/training/types.js +4 -4
  382. package/dist/training/unit-model-lineage.d.ts +72 -0
  383. package/dist/training/unit-model-lineage.d.ts.map +1 -0
  384. package/dist/training/unit-model-lineage.js +288 -0
  385. package/dist/training/unit-model-lineage.js.map +1 -0
  386. package/dist/tsconfig.tsbuildinfo +1 -0
  387. package/package.json +16 -13
  388. package/dist/operations/__tests__/helpers.d.ts +0 -30
  389. package/dist/operations/__tests__/helpers.d.ts.map +0 -1
  390. package/dist/operations/__tests__/helpers.js +0 -44
  391. package/dist/operations/__tests__/helpers.js.map +0 -1
@@ -0,0 +1,171 @@
1
+ /**
2
+ * @module snapshot/holdout-carver
3
+ *
4
+ * Assigns each row its manifest role: training carves the unit rows before anything is validated or assembled, and
5
+ * carves the assembled rows again before the snapshot is written; the roles are part of the manifest,
6
+ * so they are part of the snapshot's fingerprint. The locked holdout is the one the bound Evaluation Protocol declares
7
+ * ({@link HoldoutCarvers.CarverForProtocol}, the one place a holdout kind maps to a carver): a date carve on the
8
+ * declared column, a seeded row-hash carve, or a forecast's rolling-origin test periods. Each carve returns the roles
9
+ * and what it carved ({@link HoldoutCarveOutcome}); the run stores that summary with its results.
10
+ */
11
+ import { HoldoutCarve, UtcDay, } from '@memberjunction/predictive-studio-core';
12
+ import { OrdinalCompare } from '@memberjunction/global';
13
+ import { TrainingRefusedError } from '../training/training-refusal.js';
14
+ import { SnapshotHash } from './snapshot-hash.js';
15
+ /** The date column a date carve reads from the unit row itself, rather than from the row's source fields. */
16
+ const DECISION_DATE_COLUMN = 'DecisionDate';
17
+ /**
18
+ * The date carve: rows whose carve date is on or after the cutoff (and before `holdoutEnd`, when set) are the locked
19
+ * holdout, earlier rows are development, later rows are left out of the snapshot and counted. The carve date is the
20
+ * unit row's decision date when the protocol's `dateColumn` is `DecisionDate`, else the row's own field of that name.
21
+ * The carve groups rows by the unit row's group key, so a new-entity report holds out whole groups (the unit's group
22
+ * key value, or the row's entity key when the unit declares none; a protocol whose report names another key is
23
+ * refused before any row is read).
24
+ */
25
+ export class DateCarvedCarver {
26
+ /**
27
+ * @param holdout the protocol's date-carved holdout
28
+ * @param period the unit's decision period, the slice each holdout period summarises
29
+ */
30
+ constructor(holdout, period) {
31
+ this.holdout = holdout;
32
+ this.period = period;
33
+ }
34
+ /** @throws TrainingRefusedError (`carve` stage) for a row without a readable carve date, or a carve that leaves no development or no holdout row */
35
+ AssignRoles(rows, unitRows) {
36
+ const carve = HoldoutCarve.CarveLockedHoldout(rows.map((a) => this.carveRow(HoldoutCarvers.UnitRowOf(unitRows, a.RowID))), this.holdout);
37
+ if (carve.Ok === false)
38
+ throw new TrainingRefusedError({ stage: 'carve', reason: carve.Refusal });
39
+ const d = carve.Deployment;
40
+ const ne = carve.NewEntity;
41
+ const summary = {
42
+ kind: 'date-carved', cutoff: this.holdout.cutoff, holdoutEnd: this.holdout.holdoutEnd, developmentRowCount: d.DevelopmentRowCount,
43
+ holdoutRowCount: d.HoldoutRowCount, excludedAfterHoldoutEnd: d.ExcludedAfterHoldoutEnd, holdoutClassCounts: d.HoldoutClassCounts,
44
+ holdoutPeriods: HoldoutCarve.HoldoutPeriods(d.HoldoutCarveDates, this.period),
45
+ newEntity: ne === null ? null : {
46
+ holdoutEntityKeys: ne.HoldoutEntityKeys.length, trainingRowCount: ne.TrainingRowIDs.length, holdoutRowCount: ne.HoldoutRowIDs.length,
47
+ excludedRowCount: ne.ExcludedRowCount, sharedEntityKeys: ne.SharedEntityKeys,
48
+ heldGroupKeysSha256: DateCarvedCarver.GroupKeysSha256(ne.HoldoutEntityKeys),
49
+ trainingGroupKeysSha256: DateCarvedCarver.GroupKeysSha256(ne.TrainingRowIDs.map((id) => HoldoutCarvers.UnitRowOf(unitRows, id).GroupKey)),
50
+ },
51
+ };
52
+ return { Roles: new Map(d.Rows.map((r) => [r.RowID, r.Role])), Summary: summary };
53
+ }
54
+ /**
55
+ * SHA-256 (lower-case hex) of a set of group keys as the new-entity summary stores it: the distinct keys (the unit row's
56
+ * group key, as the carve groups rows), sorted with `OrdinalCompare`, joined with `\n`, UTF-8.
57
+ */
58
+ static GroupKeysSha256(keys) {
59
+ return SnapshotHash.Sha256Hex([...new Set(keys)].sort(OrdinalCompare).join('\n'));
60
+ }
61
+ /** The unit row as the date carve reads it; a row whose carve column is empty or names no day is refused. */
62
+ carveRow(u) {
63
+ const column = this.holdout.dateColumn;
64
+ const day = column === DECISION_DATE_COLUMN ? u.DecisionDate : UtcDay.ToUtcDay(u.Source[column]);
65
+ if (day === null)
66
+ throw new TrainingRefusedError({ stage: 'carve', reason: { kind: 'missing-carve-date', rowId: u.RowID, column } });
67
+ return { RowID: u.RowID, EntityKey: u.GroupKey, CarveDate: UtcDay.UtcDayIso(day), Label: typeof u.Label === 'string' ? u.Label : null };
68
+ }
69
+ }
70
+ /**
71
+ * The seeded group-hash carve for units whose rows share one fixed decision date (no date to carve on): a row is held
72
+ * out when the protocol seed's hash of its group key (the entity key when the unit declares no group field) falls
73
+ * below the fraction, so a group is never split across the holdout, whatever the order the rows were read in.
74
+ * A carve that leaves either side empty is refused.
75
+ */
76
+ export class SeededRandomCarver {
77
+ /**
78
+ * @param fraction the protocol's holdout fraction, in (0, 1)
79
+ * @param seed the protocol's seed
80
+ */
81
+ constructor(fraction, seed) {
82
+ this.fraction = fraction;
83
+ this.seed = seed;
84
+ }
85
+ /** @throws TrainingRefusedError (`carve` stage, `seeded-random-side-empty`) when the carve leaves no holdout or no development row */
86
+ AssignRoles(rows, unitRows) {
87
+ const carve = HoldoutCarve.SeededRandomCarve(rows.map((r) => ({ RowID: r.RowID, GroupKey: HoldoutCarvers.UnitRowOf(unitRows, r.RowID).GroupKey })), this.fraction, this.seed);
88
+ this.refuseEmptySide(carve.HoldoutRowIDs.length, carve.DevelopmentRowIDs.length);
89
+ const summary = {
90
+ kind: 'seeded-random', cutoff: null, holdoutEnd: null, developmentRowCount: carve.DevelopmentRowIDs.length, holdoutRowCount: carve.HoldoutRowIDs.length,
91
+ excludedAfterHoldoutEnd: 0, holdoutClassCounts: SeededRandomCarver.classCounts(carve.HoldoutRowIDs, unitRows), holdoutPeriods: [], newEntity: null,
92
+ };
93
+ const roles = new Map([
94
+ ...carve.DevelopmentRowIDs.map((id) => [id, 'development']),
95
+ ...carve.HoldoutRowIDs.map((id) => [id, 'locked-holdout']),
96
+ ]);
97
+ return { Roles: roles, Summary: summary };
98
+ }
99
+ /** A carve with no holdout row has nothing to test on, and one with no development row nothing to train on. */
100
+ refuseEmptySide(holdoutRows, developmentRows) {
101
+ const rows = holdoutRows + developmentRows;
102
+ if (holdoutRows === 0)
103
+ throw new TrainingRefusedError({ stage: 'carve', reason: { kind: 'seeded-random-side-empty', side: 'locked-holdout', fraction: this.fraction, rows } });
104
+ if (developmentRows === 0)
105
+ throw new TrainingRefusedError({ stage: 'carve', reason: { kind: 'seeded-random-side-empty', side: 'development', fraction: this.fraction, rows } });
106
+ }
107
+ /** Holdout rows per class label; null when no holdout row has a text label (a numeric task). */
108
+ static classCounts(holdoutRowIds, unitRows) {
109
+ const counts = {};
110
+ for (const id of holdoutRowIds) {
111
+ const label = HoldoutCarvers.UnitRowOf(unitRows, id).Label;
112
+ if (typeof label === 'string')
113
+ counts[label] = (counts[label] || 0) + 1;
114
+ }
115
+ return Object.keys(counts).length > 0 ? counts : null;
116
+ }
117
+ }
118
+ /**
119
+ * Holds out a forecast's rolling-origin test periods: the last `origins × horizonPeriods` distinct periods, the rows the
120
+ * trainer scores its outer origins on (Core's `HoldoutCarve.RollingOriginCarve`, so the manifest's locked-holdout rows
121
+ * are exactly the trainer's design). Each row's period is its unit row's period.
122
+ */
123
+ export class RollingOriginCarver {
124
+ /** @param holdout the protocol's rolling-origin holdout */
125
+ constructor(holdout) {
126
+ this.holdout = holdout;
127
+ }
128
+ /** @throws TrainingRefusedError (`carve` stage) for a row without a period, or a series too short for the design */
129
+ AssignRoles(rows, unitRows) {
130
+ const periodRows = rows.map((r) => {
131
+ const period = HoldoutCarvers.UnitRowOf(unitRows, r.RowID).Period;
132
+ if (period === null)
133
+ throw new TrainingRefusedError({ stage: 'carve', reason: { kind: 'missing-carve-date', rowId: r.RowID, column: 'Period' } });
134
+ return { RowID: r.RowID, Period: UtcDay.UtcDayIso(period) };
135
+ });
136
+ const carved = HoldoutCarve.RollingOriginCarve(periodRows, this.holdout);
137
+ if (carved.Ok === false)
138
+ throw new TrainingRefusedError({ stage: 'carve', reason: carved.Refusal });
139
+ const held = new Set(carved.HoldoutRowIDs);
140
+ const summary = {
141
+ // The first test period is where the holdout starts; a rolling-origin holdout has no end and keeps every row.
142
+ kind: 'rolling-origin', cutoff: carved.HoldoutPeriods[0] || null, holdoutEnd: null, developmentRowCount: rows.length - held.size,
143
+ holdoutRowCount: held.size, excludedAfterHoldoutEnd: 0, holdoutClassCounts: null, holdoutPeriods: carved.HoldoutPeriods, newEntity: null,
144
+ };
145
+ return { Roles: new Map(rows.map((r) => [r.RowID, held.has(r.RowID) ? 'locked-holdout' : 'development'])), Summary: summary };
146
+ }
147
+ }
148
+ /** The carver a protocol declares, and the unit-row lookup the carvers share. */
149
+ export class HoldoutCarvers {
150
+ /** The carver for the protocol's holdout kind: the only place a holdout kind maps to a carver. */
151
+ static CarverForProtocol(protocol, unit) {
152
+ const holdout = protocol.holdout;
153
+ switch (holdout.kind) {
154
+ case 'date-carved': return new DateCarvedCarver(holdout, unit.decision.period);
155
+ case 'seeded-random': return new SeededRandomCarver(holdout.fraction, protocol.seed);
156
+ case 'rolling-origin': return new RollingOriginCarver(holdout);
157
+ default: {
158
+ const unknown = holdout;
159
+ throw new Error(`Holdout carve: unknown holdout kind ${JSON.stringify(unknown)}`);
160
+ }
161
+ }
162
+ }
163
+ /** The unit row behind an assembled row; an assembled row without one is a caller error (the rows came from elsewhere). */
164
+ static UnitRowOf(unitRows, rowId) {
165
+ const u = unitRows.get(rowId);
166
+ if (!u)
167
+ throw new Error(`Holdout carve: assembled row ${rowId} is not a unit row`);
168
+ return u;
169
+ }
170
+ }
171
+ //# sourceMappingURL=holdout-carver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"holdout-carver.js","sourceRoot":"","sources":["../../src/snapshot/holdout-carver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,YAAY,EACZ,MAAM,GAQP,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAK/C,6GAA6G;AAC7G,MAAM,oBAAoB,GAAG,cAAc,CAAC;AA4B5C;;;;;;;GAOG;AACH,MAAM,O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,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC/E,KAAK,eAAe,CAAC,CAAC,OAAO,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrF,KAAK,gBAAgB,CAAC,CAAC,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAC/D,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,OAAO,GAAU,OAAO,CAAC;gBAC/B,MAAM,IAAI,KAAK,CAAC,uCAAuC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACpF,CAAC;QACH,CAAC;IACH,CAAC;IAED,2HAA2H;IACpH,MAAM,CAAC,SAAS,CAAC,QAAsC,EAAE,KAAa;QAC3E,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,KAAK,oBAAoB,CAAC,CAAC;QACnF,OAAO,CAAC,CAAC;IACX,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @module snapshot
3
+ *
4
+ * Barrel for the Training Snapshot: the byte hash, the three files' serialization, parsing and
5
+ * fingerprints, the assembly code-version stamp, the write-once file stores, the verified manifest read, the protocol's
6
+ * holdout carvers, the builder, the snapshot and run reads, and training from a snapshot.
7
+ */
8
+ export * from './snapshot-hash.js';
9
+ export * from './snapshot-serialization.js';
10
+ export * from './code-version.js';
11
+ export * from './snapshot-file-store.js';
12
+ export * from './snapshot-manifest.js';
13
+ export * from './holdout-carver.js';
14
+ export * from './snapshot-builder.js';
15
+ export * from './training-snapshot-store.js';
16
+ export * from './snapshot-retrainer.js';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snapshot/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @module snapshot
3
+ *
4
+ * Barrel for the Training Snapshot: the byte hash, the three files' serialization, parsing and
5
+ * fingerprints, the assembly code-version stamp, the write-once file stores, the verified manifest read, the protocol's
6
+ * holdout carvers, the builder, the snapshot and run reads, and training from a snapshot.
7
+ */
8
+ export * from './snapshot-hash.js';
9
+ export * from './snapshot-serialization.js';
10
+ export * from './code-version.js';
11
+ export * from './snapshot-file-store.js';
12
+ export * from './snapshot-manifest.js';
13
+ export * from './holdout-carver.js';
14
+ export * from './snapshot-builder.js';
15
+ export * from './training-snapshot-store.js';
16
+ export * from './snapshot-retrainer.js';
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/snapshot/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,152 @@
1
+ /**
2
+ * @module snapshot/snapshot-builder
3
+ *
4
+ * Builds the immutable Training Snapshot a model is trained on: its content (matrix, row manifest and per-value
5
+ * provenance), the three files, the fingerprint, and the `MJ: ML Training Snapshots` row with every count the gates
6
+ * read. Identical content resolves to one snapshot: the content hash is unique, so a build whose hash already exists
7
+ * reuses that snapshot instead of writing another.
8
+ */
9
+ import type { UserInfo } from '@memberjunction/core';
10
+ import type { MJMLTrainingSnapshotEntity } from '@memberjunction/core-entities';
11
+ import { type FeatureColumnSpec, type PredictionUnitSpec, type SnapshotFeatureColumn, type SnapshotRowRole } from '@memberjunction/predictive-studio-core';
12
+ import { type AsOfAssembledMatrix } from '../feature-assembly/as-of/as-of-assembler.js';
13
+ import type { UnitRow } from '../prediction-unit/unit-row-reader.js';
14
+ import type { SourceRow } from '../feature-assembly/data-access.js';
15
+ import type { IEntityFactory } from '../training/types.js';
16
+ import type { UnitRowsRead } from '../training/training-engine.js';
17
+ import { type SnapshotContent, type SnapshotFileBytes } from './snapshot-serialization.js';
18
+ import type { ISnapshotFileStore, StoredSnapshotFile } from './snapshot-file-store.js';
19
+ /** Everything a snapshot is built from: the unit read, the assembled matrix, the row roles and where to write. */
20
+ export interface SnapshotBuildInput {
21
+ readonly PipelineID: string;
22
+ readonly FeatureSpecVersion: number;
23
+ readonly Unit: PredictionUnitSpec;
24
+ readonly UnitRead: UnitRowsRead;
25
+ readonly Features: readonly FeatureColumnSpec[];
26
+ readonly Assembled: AsOfAssembledMatrix;
27
+ readonly Roles: ReadonlyMap<string, SnapshotRowRole>;
28
+ readonly EvaluationProtocolID: string | null;
29
+ /** Write the incumbent-score column (the bound protocol declares an `incumbent-heuristic` baseline). */
30
+ readonly IncumbentScore: boolean;
31
+ /** The protocol's slice subgroup fields, written as `__ps_slice:<field>` columns (empty when the protocol declares none). */
32
+ readonly SliceFields: readonly string[];
33
+ readonly Files: ISnapshotFileStore;
34
+ readonly EntityFactory: IEntityFactory;
35
+ readonly ContextUser?: UserInfo;
36
+ /** The saved snapshot with this content hash, or null when there is none. */
37
+ readonly ExistingByContentHash: (contentHash: string) => Promise<MJMLTrainingSnapshotEntity | null>;
38
+ }
39
+ /**
40
+ * A built snapshot: its row, its content, and whether an existing snapshot with the same content was reused. On reuse,
41
+ * `Content` is this build's content: its matrix and manifest equal the stored ones (they are in the content hash), but
42
+ * its `Provenance` is this build's, while `Entity.ProvenanceFileID` points at the stored provenance file of the
43
+ * snapshot that was reused. Only that stored provenance file is authoritative for the snapshot.
44
+ */
45
+ export interface BuiltSnapshot {
46
+ readonly Entity: MJMLTrainingSnapshotEntity;
47
+ readonly Content: SnapshotContent;
48
+ readonly Reused: boolean;
49
+ }
50
+ /** The three stored snapshot files. */
51
+ export interface StoredSnapshotFiles {
52
+ readonly Matrix: StoredSnapshotFile;
53
+ readonly Manifest: StoredSnapshotFile;
54
+ readonly Provenance: StoredSnapshotFile;
55
+ }
56
+ /** The snapshot's fingerprint: its content hash and the feature schema it was computed over. */
57
+ export interface SnapshotHashes {
58
+ readonly ContentHash: string;
59
+ readonly FeatureSchemaHash: string;
60
+ readonly SchemaColumns: readonly SnapshotFeatureColumn[];
61
+ }
62
+ /** The outcome of saving the snapshot row: the saved row, or the failed Save's CompleteMessage. */
63
+ export type SnapshotRowSave = {
64
+ readonly Status: 'saved';
65
+ readonly Entity: MJMLTrainingSnapshotEntity;
66
+ } | {
67
+ readonly Status: 'failed';
68
+ readonly Error: string;
69
+ };
70
+ /** Builds Training Snapshots; stateless, construct once and reuse. */
71
+ export declare class TrainingSnapshotBuilder {
72
+ /**
73
+ * Kept rows → content → files → fingerprint; reuses an existing snapshot with the same content hash, else writes files
74
+ * and row. Only the assembled rows the carver gave a role are in the snapshot: a row it left out (a date carve's row
75
+ * on or after `holdoutEnd`) is in no file and no count of the row; the unit read's counts are unchanged.
76
+ */
77
+ Build(built: SnapshotBuildInput): Promise<BuiltSnapshot>;
78
+ /**
79
+ * The build input over the rows the carver kept: the assembled rows that have a role, in their assembled order. The
80
+ * matrix, manifest, provenance, slice and incumbent cells and the class balance all read the kept rows only.
81
+ */
82
+ static KeptRows(input: SnapshotBuildInput): SnapshotBuildInput;
83
+ /** The snapshot content: header, matrix rows (+ incumbent/slice cells), manifest in matrix order, provenance. */
84
+ protected BuildContent(input: SnapshotBuildInput): SnapshotContent;
85
+ /**
86
+ * The content hash and the feature schema it covers. The provenance file is not an input (it records when each
87
+ * value was computed, so identical data would otherwise hash differently on every assembly); its own hash is
88
+ * stored on the row and verified when the files are read back.
89
+ */
90
+ protected Fingerprint(input: SnapshotBuildInput, files: SnapshotFileBytes): SnapshotHashes;
91
+ /**
92
+ * The three write-once files, uploaded in parallel (independent objects) under the content-hash prefix. The keys
93
+ * are deterministic and the stores accept identical bytes under an existing key, so a build that failed after
94
+ * writing, or lost the content-hash race, leaves the same objects a later build of the same content reuses.
95
+ *
96
+ * The provenance file is outside the content hash (it records when each value was computed), so identical content
97
+ * can carry different provenance bytes; its object is keyed by its own SHA-256 so each version gets its own object.
98
+ * A build that loses the content-hash race can therefore leave one provenance object no snapshot references (the
99
+ * row references the winner's). Readers reach every file through the row's file IDs and the `MJ: Files` row's
100
+ * stored key, never by rebuilding a key.
101
+ */
102
+ protected WriteFiles(store: ISnapshotFileStore, contentHash: string, files: SnapshotFileBytes): Promise<StoredSnapshotFiles>;
103
+ /** The `MJ: ML Training Snapshots` row with every count the gates read, or the failed Save's CompleteMessage. */
104
+ protected SaveSnapshotRow(input: SnapshotBuildInput, content: SnapshotContent, stored: StoredSnapshotFiles, hashes: SnapshotHashes): Promise<SnapshotRowSave>;
105
+ /**
106
+ * The snapshot another build saved with the same content hash while this one was writing. A failed save is
107
+ * resolved by re-reading rather than by reading the error text: when a snapshot with this hash now exists, the
108
+ * unique content hash is what refused this row, and that snapshot is the one identical content resolves to. When
109
+ * none exists, the save failed for another reason and that reason is thrown.
110
+ */
111
+ protected SnapshotSavedFirst(input: SnapshotBuildInput, contentHash: string, saveError: string): Promise<MJMLTrainingSnapshotEntity>;
112
+ /**
113
+ * The series a manifest row belongs to. A forecast unit of kind `grain` has one row per period of a single series, so
114
+ * every row carries one series key: the unit's grain entity name (the unit's single series). Every other unit keeps
115
+ * the row's entity key (the grain record for a `grain` unit, the grain foreign key for a `grain-x-periods` unit), so
116
+ * a `grain-x-periods` forecast keeps one series per grain record, which the protocol rules refuse at bind time.
117
+ */
118
+ static ManifestEntityKey(unit: Pick<PredictionUnitSpec, 'rows' | 'label'>, row: Pick<UnitRow, 'EntityKey'>): string;
119
+ /** One manifest line: the unit row's keys and dates, and the role the carver assigned. */
120
+ private manifestLine;
121
+ /** Each matrix feature column with its source column and the full encoding of the feature it came from. */
122
+ private featureColumns;
123
+ /** The incumbent-score and slice columns: names and the cells of assembled row i. */
124
+ private extraColumns;
125
+ /**
126
+ * Whether a protocol's slice field can be written: it names an assembled feature column, or a field every given unit
127
+ * row carries. Training checks it before the as-of assembly (over every unit row) and the builder again when it
128
+ * writes the column (over the assembled rows), with this one rule.
129
+ */
130
+ static SliceFieldResolves(field: string, columnNames: ReadonlySet<string>, unitRowSources: readonly SourceRow[]): boolean;
131
+ /** `__ps_incumbent_score`: the unit's rule evaluated per row; a unit without a rule, or a rule naming an unassembled column, or one with no value on some row, is refused. */
132
+ private incumbentColumn;
133
+ /**
134
+ * `__ps_slice:<field>`: the field's value as a string, from the assembled column of that name, else from the unit
135
+ * row's own field. A field that is neither an assembled column nor a field of every unit row is refused.
136
+ */
137
+ private sliceColumn;
138
+ /** The three files' IDs, hashes and sizes on the snapshot row. */
139
+ private static setFiles;
140
+ /** The unit read's resolution counts and the assembly's uncovered-row counts. A snapshot exists only for a complete read. */
141
+ private static setCounts;
142
+ private static refuseColumn;
143
+ /**
144
+ * The carver's role for a kept row. Every row the snapshot holds has one ({@link KeptRows} keeps only rows with a
145
+ * role); a missing role here is a caller error (the content was built without the kept rows), never defaulted, so the
146
+ * manifest and the counts stored beside it cannot disagree.
147
+ */
148
+ private static roleOf;
149
+ /** Rows per label over the written manifest's rows, in ordinal label order, so the row describes the stored manifest. */
150
+ private static classBalance;
151
+ }
152
+ //# sourceMappingURL=snapshot-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot-builder.d.ts","sourceRoot":"","sources":["../../src/snapshot/snapshot-builder.ts"],"names":[],"mappings":"A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