@memberjunction/predictive-studio 6.2.1 → 6.3.0-edge.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -11
- package/dist/actions/base-predictive-studio.action.d.ts +7 -0
- package/dist/actions/base-predictive-studio.action.d.ts.map +1 -1
- package/dist/actions/base-predictive-studio.action.js +22 -0
- package/dist/actions/base-predictive-studio.action.js.map +1 -1
- package/dist/actions/driver-classes.d.ts +2 -0
- package/dist/actions/driver-classes.d.ts.map +1 -1
- package/dist/actions/driver-classes.js +2 -0
- package/dist/actions/driver-classes.js.map +1 -1
- package/dist/actions/evaluate-drift.action.d.ts +100 -0
- package/dist/actions/evaluate-drift.action.d.ts.map +1 -0
- package/dist/actions/evaluate-drift.action.js +512 -0
- package/dist/actions/evaluate-drift.action.js.map +1 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +7 -0
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/migrate-pipelines.action.d.ts +19 -0
- package/dist/actions/migrate-pipelines.action.d.ts.map +1 -0
- package/dist/actions/migrate-pipelines.action.js +51 -0
- package/dist/actions/migrate-pipelines.action.js.map +1 -0
- package/dist/actions/promote-model.action.d.ts +12 -1
- package/dist/actions/promote-model.action.d.ts.map +1 -1
- package/dist/actions/promote-model.action.js +7 -2
- package/dist/actions/promote-model.action.js.map +1 -1
- package/dist/actions/promote-model.gate.d.ts +31 -2
- package/dist/actions/promote-model.gate.d.ts.map +1 -1
- package/dist/actions/promote-model.gate.js +84 -5
- package/dist/actions/promote-model.gate.js.map +1 -1
- package/dist/actions/run-experiment.action.d.ts.map +1 -1
- package/dist/actions/run-experiment.action.js +5 -4
- package/dist/actions/run-experiment.action.js.map +1 -1
- package/dist/actions/schedule-model-scoring.action.js +2 -2
- package/dist/actions/schedule-model-scoring.action.js.map +1 -1
- package/dist/actions/score-record-set.action.js +1 -1
- package/dist/actions/score-record-set.action.js.map +1 -1
- package/dist/actions/score-record-set.runner.d.ts +2 -2
- package/dist/actions/score-record-set.runner.js +3 -3
- package/dist/actions/score-record-set.runner.js.map +1 -1
- package/dist/actions/train-model.action.d.ts +28 -25
- package/dist/actions/train-model.action.d.ts.map +1 -1
- package/dist/actions/train-model.action.js +50 -39
- package/dist/actions/train-model.action.js.map +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/modeling-plan-to-pipeline.d.ts +0 -2
- package/dist/agent/modeling-plan-to-pipeline.d.ts.map +1 -1
- package/dist/agent/modeling-plan-to-pipeline.js +30 -39
- package/dist/agent/modeling-plan-to-pipeline.js.map +1 -1
- package/dist/agent/pipeline-builder-agent.d.ts +47 -18
- package/dist/agent/pipeline-builder-agent.d.ts.map +1 -1
- package/dist/agent/pipeline-builder-agent.js +161 -92
- package/dist/agent/pipeline-builder-agent.js.map +1 -1
- package/dist/agent/pipeline-builder.d.ts +178 -56
- package/dist/agent/pipeline-builder.d.ts.map +1 -1
- package/dist/agent/pipeline-builder.js +333 -234
- package/dist/agent/pipeline-builder.js.map +1 -1
- package/dist/experiment/budget.d.ts +61 -0
- package/dist/experiment/budget.d.ts.map +1 -0
- package/dist/experiment/budget.js +72 -0
- package/dist/experiment/budget.js.map +1 -0
- package/dist/experiment/experiment-orchestrator.d.ts +43 -7
- package/dist/experiment/experiment-orchestrator.d.ts.map +1 -1
- package/dist/experiment/experiment-orchestrator.js +130 -33
- package/dist/experiment/experiment-orchestrator.js.map +1 -1
- package/dist/experiment/index.d.ts +2 -0
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/index.js +2 -0
- package/dist/experiment/index.js.map +1 -1
- package/dist/experiment/leaderboard.d.ts +15 -15
- package/dist/experiment/leaderboard.d.ts.map +1 -1
- package/dist/experiment/leaderboard.js +44 -18
- package/dist/experiment/leaderboard.js.map +1 -1
- package/dist/experiment/scores.d.ts +32 -0
- package/dist/experiment/scores.d.ts.map +1 -0
- package/dist/experiment/scores.js +62 -0
- package/dist/experiment/scores.js.map +1 -0
- package/dist/experiment/seams.d.ts +23 -20
- package/dist/experiment/seams.d.ts.map +1 -1
- package/dist/experiment/seams.js +54 -56
- package/dist/experiment/seams.js.map +1 -1
- package/dist/experiment/types.d.ts +55 -10
- package/dist/experiment/types.d.ts.map +1 -1
- package/dist/experiment/types.js.map +1 -1
- package/dist/feature-assembly/as-of/as-of-assembler.d.ts +412 -0
- package/dist/feature-assembly/as-of/as-of-assembler.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/as-of-assembler.js +1239 -0
- package/dist/feature-assembly/as-of/as-of-assembler.js.map +1 -0
- package/dist/feature-assembly/as-of/feature-resolution.d.ts +84 -0
- package/dist/feature-assembly/as-of/feature-resolution.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/feature-resolution.js +229 -0
- package/dist/feature-assembly/as-of/feature-resolution.js.map +1 -0
- package/dist/feature-assembly/as-of/index.d.ts +15 -0
- package/dist/feature-assembly/as-of/index.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/index.js +15 -0
- package/dist/feature-assembly/as-of/index.js.map +1 -0
- package/dist/feature-assembly/as-of/read-by-keys.d.ts +30 -0
- package/dist/feature-assembly/as-of/read-by-keys.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/read-by-keys.js +51 -0
- package/dist/feature-assembly/as-of/read-by-keys.js.map +1 -0
- package/dist/feature-assembly/as-of/record-history.d.ts +256 -0
- package/dist/feature-assembly/as-of/record-history.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/record-history.js +505 -0
- package/dist/feature-assembly/as-of/record-history.js.map +1 -0
- package/dist/feature-assembly/as-of/refusal.d.ts +19 -0
- package/dist/feature-assembly/as-of/refusal.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/refusal.js +13 -0
- package/dist/feature-assembly/as-of/refusal.js.map +1 -0
- package/dist/feature-assembly/as-of/series-features.d.ts +65 -0
- package/dist/feature-assembly/as-of/series-features.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/series-features.js +97 -0
- package/dist/feature-assembly/as-of/series-features.js.map +1 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.d.ts +36 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.d.ts.map +1 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.js +99 -0
- package/dist/feature-assembly/as-of/windowed-aggregate.js.map +1 -0
- package/dist/feature-assembly/as-of.d.ts +1 -9
- package/dist/feature-assembly/as-of.d.ts.map +1 -1
- package/dist/feature-assembly/as-of.js +2 -19
- package/dist/feature-assembly/as-of.js.map +1 -1
- package/dist/feature-assembly/assembly-metadata.d.ts +34 -0
- package/dist/feature-assembly/assembly-metadata.d.ts.map +1 -0
- package/dist/feature-assembly/assembly-metadata.js +26 -0
- package/dist/feature-assembly/assembly-metadata.js.map +1 -0
- package/dist/feature-assembly/data-access.d.ts +21 -2
- package/dist/feature-assembly/data-access.d.ts.map +1 -1
- package/dist/feature-assembly/data-access.js +14 -0
- package/dist/feature-assembly/data-access.js.map +1 -1
- package/dist/feature-assembly/feature-assembly-executor.d.ts.map +1 -1
- package/dist/feature-assembly/feature-assembly-executor.js +5 -2
- package/dist/feature-assembly/feature-assembly-executor.js.map +1 -1
- package/dist/feature-assembly/index.d.ts +3 -0
- package/dist/feature-assembly/index.d.ts.map +1 -1
- package/dist/feature-assembly/index.js +3 -0
- package/dist/feature-assembly/index.js.map +1 -1
- package/dist/feature-assembly/leakage-guard.d.ts +1 -1
- package/dist/feature-assembly/leakage-guard.js +1 -1
- package/dist/feature-assembly/read-policy.d.ts +27 -0
- package/dist/feature-assembly/read-policy.d.ts.map +1 -0
- package/dist/feature-assembly/read-policy.js +63 -0
- package/dist/feature-assembly/read-policy.js.map +1 -0
- package/dist/feature-pipelines/feature-pipeline-engine.d.ts.map +1 -1
- package/dist/feature-pipelines/feature-pipeline-engine.js +3 -1
- package/dist/feature-pipelines/feature-pipeline-engine.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/maintenance/index.d.ts +1 -0
- package/dist/maintenance/index.d.ts.map +1 -1
- package/dist/maintenance/index.js +1 -0
- package/dist/maintenance/index.js.map +1 -1
- package/dist/maintenance/maintenance-engine.d.ts +16 -19
- package/dist/maintenance/maintenance-engine.d.ts.map +1 -1
- package/dist/maintenance/maintenance-engine.js +53 -53
- package/dist/maintenance/maintenance-engine.js.map +1 -1
- package/dist/maintenance/metrics.d.ts +19 -15
- package/dist/maintenance/metrics.d.ts.map +1 -1
- package/dist/maintenance/metrics.js +29 -24
- package/dist/maintenance/metrics.js.map +1 -1
- package/dist/maintenance/psi-drift-detector.d.ts +246 -0
- package/dist/maintenance/psi-drift-detector.d.ts.map +1 -0
- package/dist/maintenance/psi-drift-detector.js +1002 -0
- package/dist/maintenance/psi-drift-detector.js.map +1 -0
- package/dist/maintenance/types.d.ts +11 -2
- package/dist/maintenance/types.d.ts.map +1 -1
- package/dist/maintenance/types.js.map +1 -1
- package/dist/migration/index.d.ts +8 -0
- package/dist/migration/index.d.ts.map +1 -0
- package/dist/migration/index.js +8 -0
- package/dist/migration/index.js.map +1 -0
- package/dist/migration/legacy-pipeline-migration.d.ts +138 -0
- package/dist/migration/legacy-pipeline-migration.d.ts.map +1 -0
- package/dist/migration/legacy-pipeline-migration.js +273 -0
- package/dist/migration/legacy-pipeline-migration.js.map +1 -0
- package/dist/operations/delegation.d.ts +58 -46
- package/dist/operations/delegation.d.ts.map +1 -1
- package/dist/operations/delegation.js +90 -77
- package/dist/operations/delegation.js.map +1 -1
- package/dist/operations/promote-model.operation.d.ts +2 -2
- package/dist/operations/promote-model.operation.d.ts.map +1 -1
- package/dist/operations/promote-model.operation.js +6 -2
- package/dist/operations/promote-model.operation.js.map +1 -1
- package/dist/operations/refusals.d.ts +5 -0
- package/dist/operations/refusals.d.ts.map +1 -1
- package/dist/operations/refusals.js +26 -1
- package/dist/operations/refusals.js.map +1 -1
- package/dist/operations/start-experiment-session.operation.js +3 -3
- package/dist/operations/train-model.mapping.d.ts +91 -0
- package/dist/operations/train-model.mapping.d.ts.map +1 -0
- package/dist/operations/train-model.mapping.js +145 -0
- package/dist/operations/train-model.mapping.js.map +1 -0
- package/dist/operations/train-model.operation.d.ts +14 -9
- package/dist/operations/train-model.operation.d.ts.map +1 -1
- package/dist/operations/train-model.operation.js +30 -51
- package/dist/operations/train-model.operation.js.map +1 -1
- package/dist/prediction-unit/decision-date-advance.d.ts +46 -0
- package/dist/prediction-unit/decision-date-advance.d.ts.map +1 -0
- package/dist/prediction-unit/decision-date-advance.js +79 -0
- package/dist/prediction-unit/decision-date-advance.js.map +1 -0
- package/dist/prediction-unit/index.d.ts +12 -0
- package/dist/prediction-unit/index.d.ts.map +1 -0
- package/dist/prediction-unit/index.js +12 -0
- package/dist/prediction-unit/index.js.map +1 -0
- package/dist/prediction-unit/target-validation.d.ts +21 -0
- package/dist/prediction-unit/target-validation.d.ts.map +1 -0
- package/dist/prediction-unit/target-validation.js +54 -0
- package/dist/prediction-unit/target-validation.js.map +1 -0
- package/dist/prediction-unit/unit-row-reader.d.ts +108 -0
- package/dist/prediction-unit/unit-row-reader.d.ts.map +1 -0
- package/dist/prediction-unit/unit-row-reader.js +348 -0
- package/dist/prediction-unit/unit-row-reader.js.map +1 -0
- package/dist/prediction-unit/unit-store.d.ts +28 -0
- package/dist/prediction-unit/unit-store.d.ts.map +1 -0
- package/dist/prediction-unit/unit-store.js +41 -0
- package/dist/prediction-unit/unit-store.js.map +1 -0
- package/dist/prediction-unit/unit-versioning.d.ts +43 -0
- package/dist/prediction-unit/unit-versioning.d.ts.map +1 -0
- package/dist/prediction-unit/unit-versioning.js +71 -0
- package/dist/prediction-unit/unit-versioning.js.map +1 -0
- package/dist/protocol/index.d.ts +9 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +9 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/protocol-defaults.d.ts +37 -0
- package/dist/protocol/protocol-defaults.d.ts.map +1 -0
- package/dist/protocol/protocol-defaults.js +59 -0
- package/dist/protocol/protocol-defaults.js.map +1 -0
- package/dist/protocol/protocol-versioning.d.ts +46 -0
- package/dist/protocol/protocol-versioning.d.ts.map +1 -0
- package/dist/protocol/protocol-versioning.js +48 -0
- package/dist/protocol/protocol-versioning.js.map +1 -0
- package/dist/protocol/search-guard.d.ts +45 -0
- package/dist/protocol/search-guard.d.ts.map +1 -0
- package/dist/protocol/search-guard.js +50 -0
- package/dist/protocol/search-guard.js.map +1 -0
- package/dist/scoring/artifact-loader.d.ts +5 -32
- package/dist/scoring/artifact-loader.d.ts.map +1 -1
- package/dist/scoring/artifact-loader.js +4 -59
- package/dist/scoring/artifact-loader.js.map +1 -1
- package/dist/scoring/auto-train.d.ts +25 -5
- package/dist/scoring/auto-train.d.ts.map +1 -1
- package/dist/scoring/auto-train.js +48 -31
- package/dist/scoring/auto-train.js.map +1 -1
- package/dist/scoring/index.d.ts +3 -0
- package/dist/scoring/index.d.ts.map +1 -1
- package/dist/scoring/index.js +3 -0
- package/dist/scoring/index.js.map +1 -1
- package/dist/scoring/ml-model-inference-processor.d.ts +137 -10
- package/dist/scoring/ml-model-inference-processor.d.ts.map +1 -1
- package/dist/scoring/ml-model-inference-processor.js +383 -40
- package/dist/scoring/ml-model-inference-processor.js.map +1 -1
- package/dist/scoring/model-readiness.d.ts +45 -0
- package/dist/scoring/model-readiness.d.ts.map +1 -1
- package/dist/scoring/model-readiness.js +49 -0
- package/dist/scoring/model-readiness.js.map +1 -1
- package/dist/scoring/register.d.ts +8 -3
- package/dist/scoring/register.d.ts.map +1 -1
- package/dist/scoring/register.js +28 -4
- package/dist/scoring/register.js.map +1 -1
- package/dist/scoring/seams.d.ts +18 -2
- package/dist/scoring/seams.d.ts.map +1 -1
- package/dist/scoring/seams.js +35 -10
- package/dist/scoring/seams.js.map +1 -1
- package/dist/scoring/shadow-scoring.d.ts +245 -0
- package/dist/scoring/shadow-scoring.d.ts.map +1 -0
- package/dist/scoring/shadow-scoring.js +510 -0
- package/dist/scoring/shadow-scoring.js.map +1 -0
- package/dist/scoring/startup-register.d.ts +3 -3
- package/dist/scoring/startup-register.d.ts.map +1 -1
- package/dist/scoring/startup-register.js +10 -4
- package/dist/scoring/startup-register.js.map +1 -1
- package/dist/scoring/storage-provider-artifact-loader.d.ts +14 -0
- package/dist/scoring/storage-provider-artifact-loader.d.ts.map +1 -0
- package/dist/scoring/storage-provider-artifact-loader.js +47 -0
- package/dist/scoring/storage-provider-artifact-loader.js.map +1 -0
- package/dist/scoring/training-keys.d.ts +27 -0
- package/dist/scoring/training-keys.d.ts.map +1 -0
- package/dist/scoring/training-keys.js +54 -0
- package/dist/scoring/training-keys.js.map +1 -0
- package/dist/scoring/types.d.ts +72 -7
- package/dist/scoring/types.d.ts.map +1 -1
- package/dist/scoring/types.js +4 -0
- package/dist/scoring/types.js.map +1 -1
- package/dist/sidecar-provider.d.ts +2 -2
- package/dist/sidecar-provider.js +3 -3
- package/dist/snapshot/code-version.d.ts +16 -0
- package/dist/snapshot/code-version.d.ts.map +1 -0
- package/dist/snapshot/code-version.js +39 -0
- package/dist/snapshot/code-version.js.map +1 -0
- package/dist/snapshot/holdout-carver.d.ts +110 -0
- package/dist/snapshot/holdout-carver.d.ts.map +1 -0
- package/dist/snapshot/holdout-carver.js +171 -0
- package/dist/snapshot/holdout-carver.js.map +1 -0
- package/dist/snapshot/index.d.ts +17 -0
- package/dist/snapshot/index.d.ts.map +1 -0
- package/dist/snapshot/index.js +17 -0
- package/dist/snapshot/index.js.map +1 -0
- package/dist/snapshot/snapshot-builder.d.ts +152 -0
- package/dist/snapshot/snapshot-builder.d.ts.map +1 -0
- package/dist/snapshot/snapshot-builder.js +286 -0
- package/dist/snapshot/snapshot-builder.js.map +1 -0
- package/dist/snapshot/snapshot-file-store.d.ts +161 -0
- package/dist/snapshot/snapshot-file-store.d.ts.map +1 -0
- package/dist/snapshot/snapshot-file-store.js +204 -0
- package/dist/snapshot/snapshot-file-store.js.map +1 -0
- package/dist/snapshot/snapshot-hash.d.ts +6 -0
- package/dist/snapshot/snapshot-hash.d.ts.map +1 -0
- package/dist/snapshot/snapshot-hash.js +16 -0
- package/dist/snapshot/snapshot-hash.js.map +1 -0
- package/dist/snapshot/snapshot-manifest.d.ts +43 -0
- package/dist/snapshot/snapshot-manifest.d.ts.map +1 -0
- package/dist/snapshot/snapshot-manifest.js +43 -0
- package/dist/snapshot/snapshot-manifest.js.map +1 -0
- package/dist/snapshot/snapshot-retrainer.d.ts +107 -0
- package/dist/snapshot/snapshot-retrainer.d.ts.map +1 -0
- package/dist/snapshot/snapshot-retrainer.js +194 -0
- package/dist/snapshot/snapshot-retrainer.js.map +1 -0
- package/dist/snapshot/snapshot-serialization.d.ts +99 -0
- package/dist/snapshot/snapshot-serialization.d.ts.map +1 -0
- package/dist/snapshot/snapshot-serialization.js +191 -0
- package/dist/snapshot/snapshot-serialization.js.map +1 -0
- package/dist/snapshot/training-snapshot-store.d.ts +38 -0
- package/dist/snapshot/training-snapshot-store.d.ts.map +1 -0
- package/dist/snapshot/training-snapshot-store.js +41 -0
- package/dist/snapshot/training-snapshot-store.js.map +1 -0
- package/dist/storage/ps-storage-provider.d.ts +108 -0
- package/dist/storage/ps-storage-provider.d.ts.map +1 -0
- package/dist/storage/ps-storage-provider.js +154 -0
- package/dist/storage/ps-storage-provider.js.map +1 -0
- package/dist/training/artifact-store.d.ts +12 -103
- package/dist/training/artifact-store.d.ts.map +1 -1
- package/dist/training/artifact-store.js +13 -137
- package/dist/training/artifact-store.js.map +1 -1
- package/dist/training/compute-cost.d.ts +23 -0
- package/dist/training/compute-cost.d.ts.map +1 -0
- package/dist/training/compute-cost.js +36 -0
- package/dist/training/compute-cost.js.map +1 -0
- package/dist/training/evaluation-protocol-store.d.ts +53 -0
- package/dist/training/evaluation-protocol-store.d.ts.map +1 -0
- package/dist/training/evaluation-protocol-store.js +54 -0
- package/dist/training/evaluation-protocol-store.js.map +1 -0
- package/dist/training/index.d.ts +9 -1
- package/dist/training/index.d.ts.map +1 -1
- package/dist/training/index.js +9 -1
- package/dist/training/index.js.map +1 -1
- package/dist/training/locked-holdout.d.ts +19 -4
- package/dist/training/locked-holdout.d.ts.map +1 -1
- package/dist/training/locked-holdout.js +29 -5
- package/dist/training/locked-holdout.js.map +1 -1
- package/dist/training/seams.d.ts +34 -8
- package/dist/training/seams.d.ts.map +1 -1
- package/dist/training/seams.js +74 -18
- package/dist/training/seams.js.map +1 -1
- package/dist/training/storage-provider-artifact-store.d.ts +49 -0
- package/dist/training/storage-provider-artifact-store.d.ts.map +1 -0
- package/dist/training/storage-provider-artifact-store.js +147 -0
- package/dist/training/storage-provider-artifact-store.js.map +1 -0
- package/dist/training/trainer-model-lineage.d.ts +32 -0
- package/dist/training/trainer-model-lineage.d.ts.map +1 -0
- package/dist/training/trainer-model-lineage.js +62 -0
- package/dist/training/trainer-model-lineage.js.map +1 -0
- package/dist/training/trainer-request.d.ts +50 -0
- package/dist/training/trainer-request.d.ts.map +1 -0
- package/dist/training/trainer-request.js +65 -0
- package/dist/training/trainer-request.js.map +1 -0
- package/dist/training/trainer-result.d.ts +30 -0
- package/dist/training/trainer-result.d.ts.map +1 -0
- package/dist/training/trainer-result.js +40 -0
- package/dist/training/trainer-result.js.map +1 -0
- package/dist/training/training-engine.d.ts +417 -64
- package/dist/training/training-engine.d.ts.map +1 -1
- package/dist/training/training-engine.js +869 -178
- package/dist/training/training-engine.js.map +1 -1
- package/dist/training/training-refusal.d.ts +15 -0
- package/dist/training/training-refusal.d.ts.map +1 -0
- package/dist/training/training-refusal.js +62 -0
- package/dist/training/training-refusal.js.map +1 -0
- package/dist/training/types.d.ts +133 -41
- package/dist/training/types.d.ts.map +1 -1
- package/dist/training/types.js +4 -4
- package/dist/training/unit-model-lineage.d.ts +72 -0
- package/dist/training/unit-model-lineage.d.ts.map +1 -0
- package/dist/training/unit-model-lineage.js +288 -0
- package/dist/training/unit-model-lineage.js.map +1 -0
- package/package.json +16 -13
- package/dist/operations/__tests__/helpers.d.ts +0 -30
- package/dist/operations/__tests__/helpers.d.ts.map +0 -1
- package/dist/operations/__tests__/helpers.js +0 -44
- package/dist/operations/__tests__/helpers.js.map +0 -1
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import type { AssemblyRefusal, ChangeHistoryCoverage, ColumnEncodingKind, ColumnProvenance, FeatureColumnSpec, PredictionUnitSpec, PreprocessingOp, ReadPolicy, UncoveredRowsCount, ValueProvenance } from '@memberjunction/predictive-studio-core';
|
|
2
|
+
import type { ICountingDataAccess } from '../data-access.js';
|
|
3
|
+
import type { AssemblyEntityInfo, IAssemblyMetadata } from '../assembly-metadata.js';
|
|
4
|
+
import type { FeatureAssemblyResult } from '../feature-assembly-executor.js';
|
|
5
|
+
import { type IRecordHistoryReader } from './record-history.js';
|
|
6
|
+
import { type ChildRow } from './windowed-aggregate.js';
|
|
7
|
+
import { type SeriesHistory } from './series-features.js';
|
|
8
|
+
/** One unit row to assemble: its id, its entity key, the day it is decided on and (for period units) its period. */
|
|
9
|
+
export interface AssemblyRowRef {
|
|
10
|
+
readonly RowID: string;
|
|
11
|
+
readonly EntityKey: string;
|
|
12
|
+
readonly DecisionDate: Date;
|
|
13
|
+
readonly Period: Date | null;
|
|
14
|
+
}
|
|
15
|
+
/** One raw matrix value; preprocessing (imputation, one-hot) is fitted by the sidecar, never here. */
|
|
16
|
+
export type MatrixCell = string | number | null;
|
|
17
|
+
/** One matrix column: a feature can produce several (date parts). `Encoding` is `numeric` or `categorical`. */
|
|
18
|
+
export interface AssembledColumn {
|
|
19
|
+
readonly Name: string;
|
|
20
|
+
readonly Encoding: ColumnEncodingKind;
|
|
21
|
+
readonly SourceColumn: string;
|
|
22
|
+
readonly FeatureName: string;
|
|
23
|
+
}
|
|
24
|
+
/** One assembled row: its values in column order and the provenance of each feature's value. */
|
|
25
|
+
export interface AssembledRow {
|
|
26
|
+
readonly RowID: string;
|
|
27
|
+
readonly Values: readonly MatrixCell[];
|
|
28
|
+
readonly Provenance: readonly ValueProvenance[];
|
|
29
|
+
}
|
|
30
|
+
export interface AsOfAssemblyInput {
|
|
31
|
+
readonly Context: 'train' | 'score';
|
|
32
|
+
readonly Unit: PredictionUnitSpec;
|
|
33
|
+
readonly RowEntity: AssemblyEntityInfo;
|
|
34
|
+
readonly Rows: readonly AssemblyRowRef[];
|
|
35
|
+
readonly Features: readonly FeatureColumnSpec[];
|
|
36
|
+
readonly SeriesHistory: SeriesHistory | null;
|
|
37
|
+
readonly Read: ReadPolicy;
|
|
38
|
+
readonly DataAccess: ICountingDataAccess;
|
|
39
|
+
readonly History: IRecordHistoryReader;
|
|
40
|
+
readonly Metadata: IAssemblyMetadata;
|
|
41
|
+
readonly AssembledAt: Date;
|
|
42
|
+
readonly ExplicitOps?: readonly PreprocessingOp[];
|
|
43
|
+
/**
|
|
44
|
+
* The kept levels of each categorical column, by column name, as training produced them (the result's
|
|
45
|
+
* `CategoryLevels`). Scoring must pass training's levels so a value folds into `__other` exactly as it did in
|
|
46
|
+
* training; a column listed here is folded to these levels without recounting. Absent (training), the levels are
|
|
47
|
+
* computed from the assembled rows.
|
|
48
|
+
*/
|
|
49
|
+
readonly CategoryLevels?: ReadonlyMap<string, readonly string[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Training only: the ids of the rows, among the assembled ones, whose values the categorical fold counts its levels
|
|
52
|
+
* over (the carve's development rows). The other rows (the locked holdout) are folded to those levels as scoring folds
|
|
53
|
+
* a row, so a level seen only there becomes `__other` and never enters the kept levels. Absent, every assembled row
|
|
54
|
+
* is counted.
|
|
55
|
+
*/
|
|
56
|
+
readonly DevelopmentRowsOf?: (rows: readonly AssembledRow[]) => ReadonlySet<string>;
|
|
57
|
+
}
|
|
58
|
+
export type AsOfAssemblyResult = {
|
|
59
|
+
readonly Status: 'assembled';
|
|
60
|
+
readonly Columns: readonly AssembledColumn[];
|
|
61
|
+
readonly Rows: readonly AssembledRow[];
|
|
62
|
+
readonly ExcludedRowIDs: ReadonlySet<string>;
|
|
63
|
+
readonly UncoveredRowsExcluded: readonly UncoveredRowsCount[];
|
|
64
|
+
readonly Coverage: readonly ChangeHistoryCoverage[];
|
|
65
|
+
readonly Preprocessing: readonly PreprocessingOp[];
|
|
66
|
+
readonly ColumnProvenance: readonly ColumnProvenance[];
|
|
67
|
+
/** The kept levels of every categorical column, by column name: persist them with the model and pass them back at scoring. */
|
|
68
|
+
readonly CategoryLevels: ReadonlyMap<string, readonly string[]>;
|
|
69
|
+
} | {
|
|
70
|
+
readonly Status: 'refused';
|
|
71
|
+
readonly Refusal: AssemblyRefusal;
|
|
72
|
+
};
|
|
73
|
+
/** An assembled matrix (the successful outcome of {@link AsOfFeatureAssembler.Assemble}). */
|
|
74
|
+
export type AsOfAssembledMatrix = Extract<AsOfAssemblyResult, {
|
|
75
|
+
Status: 'assembled';
|
|
76
|
+
}>;
|
|
77
|
+
/** The level the least frequent categories beyond a column's cardinality cap fold into. */
|
|
78
|
+
export declare const OTHER_CATEGORY_LEVEL = "__other";
|
|
79
|
+
export declare class AsOfFeatureAssembler {
|
|
80
|
+
/** Impute (with a missing indicator) every column, one-hot every categorical, then the pipeline's explicit ops. */
|
|
81
|
+
static BuildPreprocessingOps(columns: readonly AssembledColumn[], features: readonly FeatureColumnSpec[], explicit?: readonly PreprocessingOp[]): PreprocessingOp[];
|
|
82
|
+
/**
|
|
83
|
+
* Adapter for the training step and the sidecar request: matrix + schema + preprocessing. With `labels` the label is
|
|
84
|
+
* appended as `labelColumn` (training); with null no label column is added (scoring).
|
|
85
|
+
*/
|
|
86
|
+
static ToFeatureAssemblyResult(assembled: AsOfAssembledMatrix, labels: ReadonlyMap<string, string | number> | null, labelColumn: string): FeatureAssemblyResult;
|
|
87
|
+
/** Assembles the dated matrix, or the first refusal met (caught with `instanceof`, never by message). */
|
|
88
|
+
Assemble(input: AsOfAssemblyInput): Promise<AsOfAssemblyResult>;
|
|
89
|
+
private assemble;
|
|
90
|
+
private static columnProvenance;
|
|
91
|
+
/**
|
|
92
|
+
* Caps every categorical column's levels. With training's kept levels for a column (`given`), every other value becomes
|
|
93
|
+
* `__other`. Otherwise the levels are counted over the `counted` rows (every row when null) and the most frequent
|
|
94
|
+
* `cap` of them are kept (count descending, then value ascending, so the fold is deterministic); every value of any
|
|
95
|
+
* row outside the kept levels becomes `__other` and is listed as folded. Returns the kept levels of every categorical
|
|
96
|
+
* column and the fold of each column that folded anything.
|
|
97
|
+
*/
|
|
98
|
+
private static foldCategoricals;
|
|
99
|
+
/** A string outside its column's kept levels becomes the other level; a column with no fold (no kept set) keeps its values. */
|
|
100
|
+
private static foldedValue;
|
|
101
|
+
/** A column the fold cannot treat honestly fails: scoring without training's levels, or a stored `__other` value. */
|
|
102
|
+
private static assertFoldable;
|
|
103
|
+
/**
|
|
104
|
+
* The kept and folded levels of one column's values. With `trained` levels the kept levels are exactly those and the
|
|
105
|
+
* folded ones are the other values seen; without, the most frequent `cap` levels are kept.
|
|
106
|
+
*/
|
|
107
|
+
private static levelFold;
|
|
108
|
+
/** One dated reader per non-identifier column; record-changes readers append their coverage. */
|
|
109
|
+
private buildReaders;
|
|
110
|
+
/** One-hot is the only categorical method the sidecar fits; any other is a pipeline the assembly cannot honour. */
|
|
111
|
+
private static assertEncodable;
|
|
112
|
+
/**
|
|
113
|
+
* Reads every row through every reader. A row with an uncovered value is excluded; every reader still runs, so the row
|
|
114
|
+
* is counted once against each entity/field it is uncovered for (in the order first met), and the `refuse` policy can
|
|
115
|
+
* name the first one with its row count. An excluded row's other values are not encoded.
|
|
116
|
+
*/
|
|
117
|
+
private assembleRows;
|
|
118
|
+
/** Counts one uncovered row against its entity/field. */
|
|
119
|
+
private static tally;
|
|
120
|
+
/**
|
|
121
|
+
* The names of the matrix columns the assembly writes for these feature columns, in order: one per column, one per
|
|
122
|
+
* date part of a date column (`<name>__<part>`), none for an identifier. The assembler names its columns with
|
|
123
|
+
* {@link ColumnsFor}, so a caller that needs the names before assembling (training checks a protocol's slice fields
|
|
124
|
+
* against them) gets exactly the assembled names.
|
|
125
|
+
*/
|
|
126
|
+
static ColumnNamesOf(features: readonly FeatureColumnSpec[]): string[];
|
|
127
|
+
/** An identifier column is excluded from the matrix; every other feature column is assembled. */
|
|
128
|
+
private static isAssembled;
|
|
129
|
+
/** The matrix columns one feature column is written as (its date parts for a date column). */
|
|
130
|
+
static ColumnsFor(spec: FeatureColumnSpec): AssembledColumn[];
|
|
131
|
+
/** Typed encoding: no variant writes 0 for a value it cannot read; non-numeric text in a numeric column refuses. */
|
|
132
|
+
private encode;
|
|
133
|
+
/** A present value as a finite number; a boolean reads as 1/0, a date or text that is not a number refuses. */
|
|
134
|
+
private static numberOf;
|
|
135
|
+
/** A present value as 1/0; anything that is not a recognisable boolean refuses. */
|
|
136
|
+
private static booleanOf;
|
|
137
|
+
/** Date parts of a dated value; a value that is not a date refuses (never 0). */
|
|
138
|
+
private encodeDateParts;
|
|
139
|
+
private readerFor;
|
|
140
|
+
/**
|
|
141
|
+
* A field read as of the decision day: replayed from Record Changes (updatable fields), or read from the stored row
|
|
142
|
+
* when the stable-value rule says the stored value is the value on every decision day.
|
|
143
|
+
*/
|
|
144
|
+
private fieldReader;
|
|
145
|
+
/**
|
|
146
|
+
* `__mj_CreatedAt` of the records whose history gives no creation instant (it starts with a Snapshot, or is empty),
|
|
147
|
+
* read by key in one read; empty, with no read, when the entity does not list the column or every history starts
|
|
148
|
+
* with a Create row. A hard-deleted record's is the one its Delete row recorded (null when it recorded none). The keys
|
|
149
|
+
* go to the read as given (the keyed read matches case-insensitively and keys its rows lower-cased); a lower-cased key
|
|
150
|
+
* would miss a mixed-case key on a case-sensitive collation.
|
|
151
|
+
*/
|
|
152
|
+
private static storedCreatedAts;
|
|
153
|
+
/**
|
|
154
|
+
* A virtual field: the entity's view joins it from a related record, so its stored value is that record's value
|
|
155
|
+
* today and no history replays it. It is read by the module's one rule for rows decided on the assembly's day or
|
|
156
|
+
* later (the stored value is the value on that day); a row decided earlier refuses the whole read (`virtual-field`),
|
|
157
|
+
* since nothing can say what the joined value was then.
|
|
158
|
+
*/
|
|
159
|
+
private static virtualFieldReader;
|
|
160
|
+
/**
|
|
161
|
+
* The stored rows of `keys` with `fields`, by lower-cased key. A key with no row is explained only when the entity's
|
|
162
|
+
* history says the record was hard-deleted (`EntityHistory.DeletedRecordAt` is not null), and its stored values are
|
|
163
|
+
* then read through that history; any other key with no row is a short read. `historyOf` is asked only when a key
|
|
164
|
+
* has no row, and gives null for an entity without change history, which explains no missing key.
|
|
165
|
+
*
|
|
166
|
+
* @throws AssemblyRefused `truncated-read` when a key with no row is not a hard-deleted record
|
|
167
|
+
*/
|
|
168
|
+
private static presentOrDeleted;
|
|
169
|
+
/**
|
|
170
|
+
* A field of `key` as stored: from its current row, else from the record a hard-deleted record's Delete row recorded
|
|
171
|
+
* (the instant does not change the recorded row), else null.
|
|
172
|
+
*/
|
|
173
|
+
private static storedFieldOf;
|
|
174
|
+
/**
|
|
175
|
+
* The entity's history for `keys` and `fields`, loaded once per assembly for one entity, field list and key set (keys
|
|
176
|
+
* case-folded and deduplicated), so every feature that reads the same records shares one load, and that load's
|
|
177
|
+
* coverage is recorded once.
|
|
178
|
+
*/
|
|
179
|
+
private static loadHistory;
|
|
180
|
+
/**
|
|
181
|
+
* Records one history load for one entity and field. A second load of the same field (another key set, through
|
|
182
|
+
* another join or as a child entity's field) merges into the first: no history start wins over any start, else the
|
|
183
|
+
* later start, and the continuity counts add.
|
|
184
|
+
*/
|
|
185
|
+
private static recordCoverage;
|
|
186
|
+
private static mergeCoverage;
|
|
187
|
+
/**
|
|
188
|
+
* The value Record Changes say the field held as of the decision day. A row with no join key has no record to replay,
|
|
189
|
+
* so its value is missing; so is a record created after the decision day. A row the history cannot replay is uncovered,
|
|
190
|
+
* with one exception, the module's one rule: a row decided on the assembly's day or later whose history does not reach
|
|
191
|
+
* that day (no history, or one that starts after it) reads the stored value as covered. A history that reaches the day
|
|
192
|
+
* but cannot be replayed (an ineligible external change, a continuity mismatch, a deletion) stays uncovered.
|
|
193
|
+
*/
|
|
194
|
+
private replayReader;
|
|
195
|
+
/**
|
|
196
|
+
* The stored value of a field for a row decided on the assembly's day or later. A key with no stored row is a
|
|
197
|
+
* hard-deleted record (the stored read refused any other, see {@link presentOrDeleted}): it reads the value its
|
|
198
|
+
* Delete row recorded when the Delete is not before the row's as-of instant, and is uncovered (`deleted`) when it is.
|
|
199
|
+
*
|
|
200
|
+
* @throws Error when a key has neither a stored row nor a hard-deleted history: the stored read was built from other keys
|
|
201
|
+
*/
|
|
202
|
+
private static storedOnDecisionDay;
|
|
203
|
+
/**
|
|
204
|
+
* The stored value of a field the stable-value rule admits. A record created after a row's decision day (by the one
|
|
205
|
+
* creation rule, `creationInstant`) reads as missing, never as its stored value; a record the rule excludes makes its
|
|
206
|
+
* row uncovered. The provenance carries the creation instant when it is known. A hard-deleted record (no stored row)
|
|
207
|
+
* is read from its Delete row: the value that row recorded when the Delete is not before the row's as-of instant
|
|
208
|
+
* (provenance naming the Delete row), uncovered (`deleted`) when it is. A field declared not updatable of a record
|
|
209
|
+
* re-created after a row's as-of instant reads the incarnation that stood then: the Delete row that ended it
|
|
210
|
+
* ({@link EntityHistory.EarlierIncarnationEnd}), provenance naming that row.
|
|
211
|
+
*/
|
|
212
|
+
private currentValueReader;
|
|
213
|
+
/**
|
|
214
|
+
* The stable-value rule for values read from stored rows: a field, the key field a row joins through, or the fields a
|
|
215
|
+
* windowed aggregate reads from its child rows. Each read is one stored record and the unit rows whose values its
|
|
216
|
+
* stored fields stand for; it is judged at each of those rows' decision instants, and its verdict is the most severe
|
|
217
|
+
* one (`changed`, then `uncovered`, `excluded`, `stable`, and `created-after` only when the record existed at none).
|
|
218
|
+
* The instants at which a read is `excluded` are reported, so a caller can mark only the rows decided then.
|
|
219
|
+
* The stored value stands (`stable`) when the field is declared not updatable, or the entity tracks Record Changes,
|
|
220
|
+
* the history covers that instant and no change row follows it that changed the field or replaced the record (an
|
|
221
|
+
* Update listing it, a Delete, or a row of any type recording a different value). A record created after a row's decision
|
|
222
|
+
* instant did not exist then (`created-after`); one the history cannot replay for another reason (a continuity
|
|
223
|
+
* mismatch, a deletion, an ineligible external row) is `excluded`, as a replayed field treats it. An update after the
|
|
224
|
+
* instant refuses `select-changes-after-decision-date`; a history that starts after it with a Snapshot, or no history,
|
|
225
|
+
* refuses `decision-date-before-change-history` under the `refuse` policy and is `excluded` under `exclude-and-count`,
|
|
226
|
+
* as a replayed field's uncovered row is; both refusals count the distinct unit rows whose own decision instant is
|
|
227
|
+
* affected. A Delete in force at an instant is `excluded` before any other verdict, a field declared not updatable
|
|
228
|
+
* included. An updatable field of an untracked entity cannot be known on a past day and refuses for every unit row.
|
|
229
|
+
* On a tracked entity the history is read for every field, a field declared not updatable included: its stored value
|
|
230
|
+
* is the value since creation, so only the creation instant is consulted for it (the reader reads an earlier
|
|
231
|
+
* incarnation's value from the Delete row that ended it, see `currentValueReader`). Creation follows the one creation
|
|
232
|
+
* rule, so a record whose history starts with a Snapshot after the decision day but whose `__mj_CreatedAt`
|
|
233
|
+
* (`storedCreatedAt`, null when the entity does not list it) is after it too did not exist then, and is not uncovered.
|
|
234
|
+
* The history is loaded over `historyKeys` (by default the reads' keys); a caller that reads other records of the
|
|
235
|
+
* entity too passes the whole key set, so the entity's history is loaded, and its coverage recorded, once.
|
|
236
|
+
*/
|
|
237
|
+
private assertStableCurrentValue;
|
|
238
|
+
/**
|
|
239
|
+
* The rule's verdict on one stored record at one instant, in the stored-read precedence (D3-251): deleted, created
|
|
240
|
+
* after, changed after the decision, then what the replay says (a continuity mismatch or an ineligible external row
|
|
241
|
+
* excludes, an unreached history is uncovered, else the value stands).
|
|
242
|
+
*/
|
|
243
|
+
private static judgeStoredValue;
|
|
244
|
+
/**
|
|
245
|
+
* Whether the record came into existence (by the one creation rule, `stored` being its `__mj_CreatedAt` or null) at
|
|
246
|
+
* or after `at`: it did not exist on the decision day `at` closes.
|
|
247
|
+
*/
|
|
248
|
+
private static createdAfter;
|
|
249
|
+
/**
|
|
250
|
+
* The one rule for when a record came into existence: its own Create row when the entity tracks Record Changes and
|
|
251
|
+
* its history starts with one; else `__mj_CreatedAt` when the entity lists the column (`stored` is its value for the
|
|
252
|
+
* record); when both are known, the later one, so neither source can make a record readable before the other says it
|
|
253
|
+
* existed; else null, and the unit's premise that its records exist on their decision days applies. A change row
|
|
254
|
+
* before the column's instant (other than the history's own opening Create, which dates the same incarnation) proves
|
|
255
|
+
* an earlier incarnation; the column then dates a re-creation and is ignored, so creation is unknown and the premise
|
|
256
|
+
* applies, unless the history's opening Create dates it.
|
|
257
|
+
*/
|
|
258
|
+
private static creationInstant;
|
|
259
|
+
/**
|
|
260
|
+
* Whether the history holds a change row before `columnAt` (the stored `__mj_CreatedAt`) other than its own opening
|
|
261
|
+
* Create (`createdAt`, from {@link EntityHistory.CreatedAt}): the record existed before the column's instant, so the
|
|
262
|
+
* column dates a re-creation.
|
|
263
|
+
*/
|
|
264
|
+
private static earlierIncarnation;
|
|
265
|
+
/** Whether a record with creation instant `created` (null = unknown, the premise applies) existed before `at`. */
|
|
266
|
+
private static existedBefore;
|
|
267
|
+
/**
|
|
268
|
+
* A read's verdict: the most severe of its verdicts at each of its instants, or `created-after` when the record
|
|
269
|
+
* existed at none. Every instant at which the read is `excluded` is added to `excludedInstants`.
|
|
270
|
+
*/
|
|
271
|
+
private static outcomeOf;
|
|
272
|
+
/** The distinct unit rows whose own decision instant gives `outcome`, over the reads whose verdict it is. */
|
|
273
|
+
private static affectedRows;
|
|
274
|
+
/** The distinct decision instants of each reads' rows, ascending, computed once per rows list (child reads share one). */
|
|
275
|
+
private static instantsOf;
|
|
276
|
+
/**
|
|
277
|
+
* The decision instants of one read's rows. `instantsOf` keys every read's `Rows` array, so a miss means the map was
|
|
278
|
+
* built from other reads: an internal error, not a data condition.
|
|
279
|
+
*
|
|
280
|
+
* @throws Error when the rows have no entry
|
|
281
|
+
*/
|
|
282
|
+
private static instantsFor;
|
|
283
|
+
/** The number of distinct unit rows the reads stand for whose decision day is before the assembly's day. */
|
|
284
|
+
private static distinctPastRows;
|
|
285
|
+
/** Whether a row's decision day is on or after the assembly's own UTC day: its stored values are the values on that day. */
|
|
286
|
+
private static onAssemblyDayOrLater;
|
|
287
|
+
/** One read per unit row with a key: the record it reads, standing for that row alone. */
|
|
288
|
+
private static rowReads;
|
|
289
|
+
/** The verdict of each unit row's own read (reads built by `rowReads`), by row id. */
|
|
290
|
+
private static outcomesByRow;
|
|
291
|
+
/** The keys with case-insensitive duplicates removed (first spelling kept), as a keyed read deduplicates them. */
|
|
292
|
+
private static uniqueKeys;
|
|
293
|
+
/**
|
|
294
|
+
* A windowed aggregate over the owner's child rows; its version hashes the contributing rows (and their update times).
|
|
295
|
+
* Every child row read passes the stable-value rule before any value is used, and a child row that did not exist on
|
|
296
|
+
* the owner row's decision day (late-entered) is dropped from that owner's window; the drops are recorded per column.
|
|
297
|
+
* A child hard-deleted after an owner row's decision day counts for that row as its Delete row recorded it, and one
|
|
298
|
+
* deleted before is absent (see {@link childIndex}). A child deleted and re-created after an owner row's decision day
|
|
299
|
+
* counts for that row as the incarnation that stood then, read from the Delete row that ended it (see
|
|
300
|
+
* {@link childRowsAt}).
|
|
301
|
+
*/
|
|
302
|
+
private aggregateReader;
|
|
303
|
+
/**
|
|
304
|
+
* One owner's aggregate as of its decision day over the child rows that existed then: the rows the full window would
|
|
305
|
+
* have read but that were entered after the decision day are dropped and counted, and the aggregate is recomputed
|
|
306
|
+
* over the owner's remaining rows. The owner's rows are those that stood at the as-of instant (`rowsAt`). A
|
|
307
|
+
* hard-deleted child whose Delete is before the decision instant (`deletedAt`, by lower-cased child key) is not in the
|
|
308
|
+
* full window at all: it is absent, not late-entered.
|
|
309
|
+
*/
|
|
310
|
+
private static aggregateOfPresentRows;
|
|
311
|
+
/**
|
|
312
|
+
* Every child row the index was built from passes the stable-value rule for the fields that decide what an aggregate
|
|
313
|
+
* reads, judged at every unit row's decision instant (each read stands for every unit row): a child row re-owned or
|
|
314
|
+
* re-dated after a decision day can move between owners, so none is exempt for contributing to no row. Every field is
|
|
315
|
+
* judged, so a later field's refusal is never hidden by an earlier field's exclusion. A child row the rule excludes
|
|
316
|
+
* at a unit row's decision instant makes that row uncovered for that field, since the child's owner on that day cannot
|
|
317
|
+
* be trusted; rows decided at instants where every child row is stable are read. A hard-deleted child (`deletedAt`,
|
|
318
|
+
* by lower-cased key) stands for the unit rows decided while it stood (its Delete at or after their as-of instant),
|
|
319
|
+
* judged on its Delete row as its stored value; after its Delete it is absent and judged for no row. Each field's
|
|
320
|
+
* history is loaded over every child key read (`keys`), judged or not, so the aggregate's own load of the owner key
|
|
321
|
+
* is the same load and coverage counts each child record once. Returns, per unit row, the first such field's
|
|
322
|
+
* marker, else null.
|
|
323
|
+
*/
|
|
324
|
+
private assertStableChildRows;
|
|
325
|
+
/**
|
|
326
|
+
* One read per child key: a present child stands for every unit row; a hard-deleted one for the rows decided while it
|
|
327
|
+
* stood, and for none after its Delete (it is then dropped). Hard-deleted children deleted at one instant share one
|
|
328
|
+
* rows list, so their decision instants are computed once.
|
|
329
|
+
*/
|
|
330
|
+
private static childReads;
|
|
331
|
+
/** Whether a child still stood at `at`: it is not hard-deleted, or its Delete is at or after `at` (as `DeletedRecordAt` reads `held`). */
|
|
332
|
+
private static standsAt;
|
|
333
|
+
/**
|
|
334
|
+
* An owner's child rows as they stood at an as-of instant. A child whose incarnation at the instant ended with a later
|
|
335
|
+
* Delete that a later change row follows (deleted and re-created after it, {@link EntityHistory.EarlierIncarnationEnd})
|
|
336
|
+
* is read from that Delete row, owner key, date, value and filter fields included, so it counts under the owner it
|
|
337
|
+
* had then and the rows read today stand only for the instants after the re-creation. Re-creation can happen only
|
|
338
|
+
* after the earliest instant if it happens after any, so only the children re-created after the earliest decision
|
|
339
|
+
* instant are consulted, once per instant. Without a history (an untracked child entity) the rows read are the rows.
|
|
340
|
+
*/
|
|
341
|
+
private static childRowsAt;
|
|
342
|
+
/** The incarnations of the `recreated` children that stood at `asOf` and ended with a later Delete, as those Delete rows recorded them. */
|
|
343
|
+
private static earlierIncarnationsAt;
|
|
344
|
+
/** One aggregate value; a row with no owner key has no child rows ('' would read the bucket of ownerless child rows). */
|
|
345
|
+
private static aggregateValue;
|
|
346
|
+
/** The child fields whose stored values decide what an aggregate reads: the owner key, the date, the value and every filter. */
|
|
347
|
+
private static childStableFields;
|
|
348
|
+
/** A declared lag or rolling window of the unit's own series, read as of the row's decision day and the assembly day ({@link SeriesFeatures.ComputeSeriesFeature}). */
|
|
349
|
+
private seriesReader;
|
|
350
|
+
/** The latest effective-dated, pinned Feature Value on or before the decision day; an unpinned source is refused. */
|
|
351
|
+
private featureValueReader;
|
|
352
|
+
/**
|
|
353
|
+
* The source's pin, when it names a version: a whole-number pipeline version (0 included) or a prompt version hash.
|
|
354
|
+
* No pin, a fractional version, or a pin naming neither refuses: such a pin cannot select one version of a value.
|
|
355
|
+
*/
|
|
356
|
+
private static pinOf;
|
|
357
|
+
/** The version a valid Feature Value pin names: its feature pipeline and the pipeline version or prompt version it read. */
|
|
358
|
+
private static pinVersion;
|
|
359
|
+
/** The Feature Values of one feature of the row entity that a pin selects; undated values are never read. */
|
|
360
|
+
private static featureValueFilter;
|
|
361
|
+
/** Feature Values keyed by lower-cased record key, each list in effective-date order. */
|
|
362
|
+
private static featureValuesByRecord;
|
|
363
|
+
private static effectiveAt;
|
|
364
|
+
/**
|
|
365
|
+
* How a row finds the record a source reads: through a key field on the row entity, or (no key field) `fallback` —
|
|
366
|
+
* the row's own id for a field, the row's entity key for an aggregate owner. A unit row deleted and re-created after
|
|
367
|
+
* its decision day resolves the key its earlier incarnation's Delete row recorded
|
|
368
|
+
* ({@link EntityHistory.EarlierIncarnationEnd}).
|
|
369
|
+
*/
|
|
370
|
+
private keyResolver;
|
|
371
|
+
/** A reader behind a join: a row uncovered for the key field is uncovered; one created after its decision day reads as missing. */
|
|
372
|
+
private static throughJoin;
|
|
373
|
+
/** A missing value with the given source reference and version, computed at the assembly time. */
|
|
374
|
+
private static missingValue;
|
|
375
|
+
/**
|
|
376
|
+
* The child entity, its indexed rows, the keys of every row read (the index skips undated and filtered-out rows),
|
|
377
|
+
* when the entity lists `__mj_CreatedAt` each row's value of it by lower-cased key, and the Delete instant of every
|
|
378
|
+
* hard-deleted child by lower-cased key. On a child entity that tracks Record Changes the rows read are the current
|
|
379
|
+
* rows plus every child whose history ends in a Delete, that has no current row and that one of `ownerKeys` held
|
|
380
|
+
* (`IRecordHistoryReader.LoadDeletedChildren`), read from its Delete row: a child deleted after an owner row's
|
|
381
|
+
* decision day existed then, and today's set of rows would silently leave it out of that row's aggregate. Only a
|
|
382
|
+
* hard-deleted child that bears on a unit row is read (its Delete at or after the as-of instant of at least one row
|
|
383
|
+
* of the batch); one deleted before every row's as-of instant is absent for every row, so it is left out of the
|
|
384
|
+
* child history's key set and shapes neither its history start nor its continuity counts.
|
|
385
|
+
*/
|
|
386
|
+
private childIndex;
|
|
387
|
+
/** The earliest as-of instant of the rows, in epoch milliseconds (positive infinity for no rows). */
|
|
388
|
+
private static earliestAsOf;
|
|
389
|
+
/** A child as a Delete row recorded it, as a stored row: the row's fields, keyed by `key` when the row omits the key. */
|
|
390
|
+
private static recordedChildRow;
|
|
391
|
+
/**
|
|
392
|
+
* A windowed aggregate's source version: the sha-256 of the contributing rows, `ID:updatedAt` per row (or the ID
|
|
393
|
+
* alone when the row has no update time), sorted, one per line. The one rule for the version, so a reader that
|
|
394
|
+
* rebuilds the contributor set can check a stored version against it.
|
|
395
|
+
*/
|
|
396
|
+
static ContributorsVersion(contributors: readonly ChildRow[]): string;
|
|
397
|
+
/** The per-column version summary stored on the snapshot (per-value versions are in the provenance file). */
|
|
398
|
+
private static columnVersion;
|
|
399
|
+
private static describeSource;
|
|
400
|
+
/** `<entity>/<lower-cased key>/<field>`: the record and field a value was read from. */
|
|
401
|
+
private static fieldRef;
|
|
402
|
+
private static hasField;
|
|
403
|
+
/** A stored timestamp as an instant; an absent or unparseable one is null. */
|
|
404
|
+
private static instantOf;
|
|
405
|
+
/** A stored timestamp as an ISO instant; an absent one is ''. */
|
|
406
|
+
private static isoOf;
|
|
407
|
+
/** The decision's UTC day; an invalid decision date is a caller defect, not a refusal. */
|
|
408
|
+
private static decisionDay;
|
|
409
|
+
/** The start of the day after the decision day: anything strictly before it was known on the decision day. */
|
|
410
|
+
private static asOfInstant;
|
|
411
|
+
}
|
|
412
|
+
//# sourceMappingURL=as-of-assembler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"as-of-assembler.d.ts","sourceRoot":"","sources":["../../../src/feature-assembly/as-of/as-of-assembler.ts"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EACV,eAAe,EAAE,qBAAqB,EAAkB,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EAC/G,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EACrF,MAAM,wCAAwC,CAAC;AAGhD,OAAO,KAAK,EAAE,mBAAmB,EAAa,MAAM,gBAAgB,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,EAAqC,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,OAAO,EAAsB,KAAK,QAAQ,EAAsB,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvE,oHAAoH;AACpH,MAAM,WAAW,cAAc;IAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE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