@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.
- 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/dist/tsconfig.tsbuildinfo +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,512 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module actions/evaluate-drift.action
|
|
3
|
+
*
|
|
4
|
+
* **Evaluate Feature and Prediction Drift** action (`WS-4.4`) — the thin Action boundary
|
|
5
|
+
* over {@link EvaluateFeatureAndPredictionDrift} and {@link LoadFeatureAndPredictionDriftFromFeatureValues}
|
|
6
|
+
* so scheduled maintenance workflows, agents, or administrative runs can compute
|
|
7
|
+
* Population Stability Index (PSI), confidence-floor degradation, and
|
|
8
|
+
* champion-vs-challenger divergence metrics, and emit a drift alert when thresholds are breached.
|
|
9
|
+
*/
|
|
10
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
13
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
|
+
};
|
|
16
|
+
var EvaluateFeatureAndPredictionDriftAction_1;
|
|
17
|
+
import { EscapeSQLString, RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
18
|
+
import { LogError, Metadata, RunView } from '@memberjunction/core';
|
|
19
|
+
import { ResourceTypeEngine, } from '@memberjunction/core-entities';
|
|
20
|
+
import { BaseAction } from '@memberjunction/actions';
|
|
21
|
+
import { UserCache } from '@memberjunction/generic-database-provider';
|
|
22
|
+
import { BasePredictiveStudioAction } from './base-predictive-studio.action.js';
|
|
23
|
+
import { EVALUATE_DRIFT_DRIVER_CLASS } from './driver-classes.js';
|
|
24
|
+
import { DEFAULT_DRIFT_MAX_ROWS, EvaluateFeatureAndPredictionDrift, LoadFeatureAndPredictionDriftForRecordProcesses, LoadFeatureAndPredictionDriftFromFeatureValues, } from '../maintenance/psi-drift-detector.js';
|
|
25
|
+
export { EVALUATE_DRIFT_DRIVER_CLASS } from './driver-classes.js';
|
|
26
|
+
const SEVERITY_RANK = {
|
|
27
|
+
None: 0,
|
|
28
|
+
Warning: 1,
|
|
29
|
+
Critical: 2,
|
|
30
|
+
};
|
|
31
|
+
/** The `MJ: Resource Types` row whose notifications link to one record of an entity. */
|
|
32
|
+
const RECORD_RESOURCE_TYPE_NAME = 'Records';
|
|
33
|
+
/**
|
|
34
|
+
* Production {@link IDriftAlertEmitter} that persists an `MJ: User Notifications` alert.
|
|
35
|
+
*
|
|
36
|
+
* Who is notified: the caller, except that the system user or an Owner may route the alert to the
|
|
37
|
+
* active user named by `NotifyUserID`. Any other caller's `NotifyUserID` is ignored, so a user cannot
|
|
38
|
+
* send notifications to someone else. The system user without a usable `NotifyUserID` notifies no one.
|
|
39
|
+
*
|
|
40
|
+
* The title and link come from the stored Record Process (or ML Model) read as the caller, never from
|
|
41
|
+
* the action's input text.
|
|
42
|
+
*/
|
|
43
|
+
export class DefaultDriftAlertEmitter {
|
|
44
|
+
constructor(provider) {
|
|
45
|
+
this.provider = provider;
|
|
46
|
+
}
|
|
47
|
+
async EmitDriftAlert(report, params, contextInfo) {
|
|
48
|
+
const provider = this.provider ?? params.Provider ?? Metadata.Provider; // global-provider-ok: RunActionParams.Provider is optional; ActionEngine contract falls back to the global provider (ActionEngine-Base.ts)
|
|
49
|
+
if (!provider) {
|
|
50
|
+
return { Emitted: false };
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const targetUserId = await this.resolveTargetUserId(params);
|
|
54
|
+
if (!targetUserId) {
|
|
55
|
+
LogError('DefaultDriftAlertEmitter: drift alert suppressed — the action ran as the system user without a NotifyUserID naming an active user.');
|
|
56
|
+
return { Emitted: false };
|
|
57
|
+
}
|
|
58
|
+
const subject = await this.loadSubject(provider, params.ContextUser, contextInfo?.recordProcessId ?? report.RecordProcessID, report.ModelID);
|
|
59
|
+
const notification = await provider.GetEntityObject('MJ: User Notifications', params.ContextUser);
|
|
60
|
+
notification.NewRecord();
|
|
61
|
+
notification.UserID = targetUserId;
|
|
62
|
+
notification.Title = `Predictive Drift Alert (${report.OverallSeverity}): ${subject?.Label ?? 'Predictive Studio'}`;
|
|
63
|
+
notification.Message = subject
|
|
64
|
+
? `Drift detected for ${subject.Label}.\n\n${report.Summary}`
|
|
65
|
+
: `Drift detected.\n\n${report.Summary}`;
|
|
66
|
+
notification.Unread = true;
|
|
67
|
+
const resourceTypeId = subject ? await this.recordResourceTypeId(provider, params.ContextUser) : undefined;
|
|
68
|
+
if (subject && resourceTypeId) {
|
|
69
|
+
notification.ResourceTypeID = resourceTypeId;
|
|
70
|
+
notification.ResourceRecordID = subject.ID;
|
|
71
|
+
notification.ResourceConfiguration = JSON.stringify({ EntityName: subject.EntityName, RecordID: subject.ID });
|
|
72
|
+
}
|
|
73
|
+
const saved = await notification.Save();
|
|
74
|
+
if (!saved) {
|
|
75
|
+
LogError(`DefaultDriftAlertEmitter: failed to save drift notification: ${notification.LatestResult?.CompleteMessage ?? 'unknown error'}`);
|
|
76
|
+
return { Emitted: false };
|
|
77
|
+
}
|
|
78
|
+
return { AlertID: notification.ID || undefined, Emitted: true };
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
LogError(error);
|
|
82
|
+
return { Emitted: false };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The user to notify: an active `NotifyUserID` when the caller is the system user or an Owner,
|
|
87
|
+
* else the caller; undefined for the system user without a usable `NotifyUserID`.
|
|
88
|
+
*/
|
|
89
|
+
async resolveTargetUserId(params) {
|
|
90
|
+
const caller = params.ContextUser;
|
|
91
|
+
const systemUser = UserCache.Instance.GetSystemUser();
|
|
92
|
+
const callerIsSystem = !!caller?.ID && !!systemUser?.ID && UUIDsEqual(caller.ID, systemUser.ID);
|
|
93
|
+
const callerMayRoute = callerIsSystem || caller?.Type?.trim().toLowerCase() === 'owner';
|
|
94
|
+
const notifyParam = params.Params?.find((p) => p.Name?.trim().toLowerCase() === 'notifyuserid');
|
|
95
|
+
const notifyUserId = typeof notifyParam?.Value === 'string' && notifyParam.Value.trim().length > 0 ? notifyParam.Value.trim() : undefined;
|
|
96
|
+
if (notifyUserId) {
|
|
97
|
+
const target = callerMayRoute ? await UserCache.Instance.FindUser({ ID: notifyUserId }) : undefined;
|
|
98
|
+
if (target?.IsActive) {
|
|
99
|
+
return target.ID;
|
|
100
|
+
}
|
|
101
|
+
LogError(callerMayRoute
|
|
102
|
+
? 'DefaultDriftAlertEmitter: NotifyUserID ignored — it names no active user.'
|
|
103
|
+
: 'DefaultDriftAlertEmitter: NotifyUserID ignored — only the system user or an Owner may route drift alerts to another user; notifying the caller.');
|
|
104
|
+
}
|
|
105
|
+
return callerIsSystem ? undefined : caller?.ID;
|
|
106
|
+
}
|
|
107
|
+
/** The stored Record Process (else ML Model) the alert is about, read as the caller; undefined when the caller cannot read it. */
|
|
108
|
+
async loadSubject(provider, contextUser, recordProcessId, modelId) {
|
|
109
|
+
const rv = RunView.FromMetadataProvider(provider);
|
|
110
|
+
if (recordProcessId) {
|
|
111
|
+
const res = await rv.RunView({
|
|
112
|
+
EntityName: 'MJ: Record Processes',
|
|
113
|
+
ExtraFilter: `ID = '${EscapeSQLString(recordProcessId)}'`,
|
|
114
|
+
Fields: ['ID', 'Name'],
|
|
115
|
+
ResultType: 'simple',
|
|
116
|
+
MaxRows: 1,
|
|
117
|
+
SkipTotalRowCount: true,
|
|
118
|
+
}, contextUser);
|
|
119
|
+
const row = res.Success ? res.Results?.[0] : undefined;
|
|
120
|
+
return row ? { EntityName: 'MJ: Record Processes', ID: row.ID, Label: `Record Process '${row.Name}'` } : undefined;
|
|
121
|
+
}
|
|
122
|
+
if (modelId) {
|
|
123
|
+
const res = await rv.RunView({
|
|
124
|
+
EntityName: 'MJ: ML Models',
|
|
125
|
+
ExtraFilter: `ID = '${EscapeSQLString(modelId)}'`,
|
|
126
|
+
Fields: ['ID', 'Pipeline', 'Version'],
|
|
127
|
+
ResultType: 'simple',
|
|
128
|
+
MaxRows: 1,
|
|
129
|
+
SkipTotalRowCount: true,
|
|
130
|
+
}, contextUser);
|
|
131
|
+
const row = res.Success ? res.Results?.[0] : undefined;
|
|
132
|
+
return row ? { EntityName: 'MJ: ML Models', ID: row.ID, Label: `ML Model '${row.Pipeline}' v${row.Version}` } : undefined;
|
|
133
|
+
}
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The `Records` resource type's ID, resolved by name through {@link ResourceTypeEngine}; undefined when it is
|
|
138
|
+
* not seeded or cannot be loaded (the alert is still sent, without its link).
|
|
139
|
+
*/
|
|
140
|
+
async recordResourceTypeId(provider, contextUser) {
|
|
141
|
+
try {
|
|
142
|
+
await ResourceTypeEngine.Instance.Config(false, contextUser, provider);
|
|
143
|
+
const resourceType = ResourceTypeEngine.Instance.ByName(RECORD_RESOURCE_TYPE_NAME);
|
|
144
|
+
if (!resourceType) {
|
|
145
|
+
LogError(`DefaultDriftAlertEmitter: no '${RECORD_RESOURCE_TYPE_NAME}' resource type is seeded; the drift alert has no record link.`);
|
|
146
|
+
}
|
|
147
|
+
return resourceType?.ID;
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
LogError(error);
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Evaluates feature PSI across numeric, categorical, and pre-binned features along with
|
|
157
|
+
* confidence-floor and champion-vs-challenger divergence metrics.
|
|
158
|
+
*/
|
|
159
|
+
let EvaluateFeatureAndPredictionDriftAction = class EvaluateFeatureAndPredictionDriftAction extends BasePredictiveStudioAction {
|
|
160
|
+
static { EvaluateFeatureAndPredictionDriftAction_1 = this; }
|
|
161
|
+
static { this.defaultAlertEmitter = null; }
|
|
162
|
+
/**
|
|
163
|
+
* Configure a process-wide default {@link IDriftAlertEmitter} used by fresh action
|
|
164
|
+
* instances instantiated through `ActionEngineServer` / `ClassFactory`.
|
|
165
|
+
*/
|
|
166
|
+
static SetDefaultAlertEmitter(emitter) {
|
|
167
|
+
EvaluateFeatureAndPredictionDriftAction_1.defaultAlertEmitter = emitter;
|
|
168
|
+
}
|
|
169
|
+
/** @inheritdoc */
|
|
170
|
+
async InternalRunAction(params) {
|
|
171
|
+
try {
|
|
172
|
+
const modelId = this.getStringParam(params, 'ModelID');
|
|
173
|
+
const recordProcessId = this.getStringParam(params, 'RecordProcessID');
|
|
174
|
+
const maxRows = this.getNumericParam(params, 'MaxRows') ?? DEFAULT_DRIFT_MAX_ROWS;
|
|
175
|
+
const numericFeatures = this.parseNumericFeatures(this.getJsonObjectParam(params, 'NumericFeatures'));
|
|
176
|
+
const categoricalFeatures = this.parseCategoricalFeatures(this.getJsonObjectParam(params, 'CategoricalFeatures'));
|
|
177
|
+
const prebinnedFeatures = this.parsePrebinnedFeatures(this.getJsonObjectParam(params, 'PrebinnedFeatures'));
|
|
178
|
+
const confidenceAndDivergence = this.parseConfidenceAndDivergence(this.getJsonObjectParam(params, 'ConfidenceAndDivergence'));
|
|
179
|
+
const hasInlineFeatures = numericFeatures !== undefined ||
|
|
180
|
+
categoricalFeatures !== undefined ||
|
|
181
|
+
prebinnedFeatures !== undefined ||
|
|
182
|
+
confidenceAndDivergence !== undefined;
|
|
183
|
+
const warningThreshold = this.getNumericParam(params, 'WarningPSIThreshold');
|
|
184
|
+
const criticalThreshold = this.getNumericParam(params, 'CriticalPSIThreshold');
|
|
185
|
+
const epsilon = this.getNumericParam(params, 'Epsilon');
|
|
186
|
+
const minSampleSize = this.getNumericParam(params, 'MinSampleSize');
|
|
187
|
+
const provider = params.Provider || Metadata.Provider; // global-provider-ok: RunActionParams.Provider is optional; ActionEngine contract falls back to the global provider (ActionEngine-Base.ts)
|
|
188
|
+
let driftInput;
|
|
189
|
+
if (hasInlineFeatures) {
|
|
190
|
+
driftInput = {
|
|
191
|
+
ModelID: modelId,
|
|
192
|
+
RecordProcessID: recordProcessId,
|
|
193
|
+
NumericFeatures: numericFeatures,
|
|
194
|
+
CategoricalFeatures: categoricalFeatures,
|
|
195
|
+
PrebinnedFeatures: prebinnedFeatures,
|
|
196
|
+
ConfidenceAndDivergence: confidenceAndDivergence,
|
|
197
|
+
WarningPSIThreshold: warningThreshold,
|
|
198
|
+
CriticalPSIThreshold: criticalThreshold,
|
|
199
|
+
Epsilon: epsilon,
|
|
200
|
+
MinSampleSize: minSampleSize,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
else if (recordProcessId || modelId) {
|
|
204
|
+
driftInput = await LoadFeatureAndPredictionDriftFromFeatureValues({
|
|
205
|
+
RecordProcessID: recordProcessId,
|
|
206
|
+
ModelID: modelId,
|
|
207
|
+
BaselineWindowEnd: this.getStringParam(params, 'BaselineWindowEnd'),
|
|
208
|
+
EvaluationWindowStart: this.getStringParam(params, 'EvaluationWindowStart'),
|
|
209
|
+
Provider: provider,
|
|
210
|
+
ContextUser: params.ContextUser,
|
|
211
|
+
WarningPSIThreshold: warningThreshold,
|
|
212
|
+
CriticalPSIThreshold: criticalThreshold,
|
|
213
|
+
Epsilon: epsilon,
|
|
214
|
+
MinSampleSize: minSampleSize,
|
|
215
|
+
MaxRows: maxRows,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
const explicitTargetParam = (params.Params ?? []).some((p) => {
|
|
220
|
+
const normalized = p.Name?.trim().toLowerCase();
|
|
221
|
+
return (p.Type !== 'Output' &&
|
|
222
|
+
(normalized === 'recordprocessid' || normalized === 'modelid'));
|
|
223
|
+
});
|
|
224
|
+
if (explicitTargetParam) {
|
|
225
|
+
return this.fail('MISSING_PARAMETER', 'At least one of RecordProcessID, ModelID, NumericFeatures, CategoricalFeatures, PrebinnedFeatures, or ConfidenceAndDivergence must be provided.');
|
|
226
|
+
}
|
|
227
|
+
return await this.runScheduledProcessSweep(params, provider, {
|
|
228
|
+
warningThreshold,
|
|
229
|
+
criticalThreshold,
|
|
230
|
+
epsilon,
|
|
231
|
+
minSampleSize,
|
|
232
|
+
maxRows,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
const report = EvaluateFeatureAndPredictionDrift(driftInput);
|
|
236
|
+
const emitAlertOnDrift = this.getBooleanParam(params, 'EmitAlertOnDrift', true);
|
|
237
|
+
let alertEmitted = false;
|
|
238
|
+
let alertId;
|
|
239
|
+
if (report.ShouldAlert && emitAlertOnDrift) {
|
|
240
|
+
const activeEmitter = EvaluateFeatureAndPredictionDriftAction_1.defaultAlertEmitter ??
|
|
241
|
+
new DefaultDriftAlertEmitter(provider);
|
|
242
|
+
const alertOutcome = await activeEmitter.EmitDriftAlert(report, params, {
|
|
243
|
+
recordProcessId,
|
|
244
|
+
});
|
|
245
|
+
alertEmitted = alertOutcome.Emitted;
|
|
246
|
+
alertId = alertOutcome.AlertID;
|
|
247
|
+
}
|
|
248
|
+
this.addOutputParam(params, 'OverallSeverity', report.OverallSeverity);
|
|
249
|
+
this.addOutputParam(params, 'MaxPSI', report.MaxPSI);
|
|
250
|
+
this.addOutputParam(params, 'DriftedFeatures', report.DriftedFeatures);
|
|
251
|
+
this.addOutputParam(params, 'FeatureResults', report.FeatureResults);
|
|
252
|
+
this.addOutputParam(params, 'DivergenceMetrics', report.DivergenceMetrics);
|
|
253
|
+
this.addOutputParam(params, 'ShouldAlert', report.ShouldAlert);
|
|
254
|
+
this.addOutputParam(params, 'InsufficientData', report.InsufficientData);
|
|
255
|
+
this.addOutputParam(params, 'Truncated', report.Truncated === true);
|
|
256
|
+
this.addOutputParam(params, 'AlertEmitted', alertEmitted);
|
|
257
|
+
if (alertId) {
|
|
258
|
+
this.addOutputParam(params, 'AlertID', alertId);
|
|
259
|
+
}
|
|
260
|
+
this.addOutputParam(params, 'Summary', report.Summary);
|
|
261
|
+
return this.ok(params, report.Summary);
|
|
262
|
+
}
|
|
263
|
+
catch (error) {
|
|
264
|
+
LogError(error);
|
|
265
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
266
|
+
if (message.startsWith('INVALID_PARAMETER:')) {
|
|
267
|
+
return this.fail('INVALID_PARAMETER', message);
|
|
268
|
+
}
|
|
269
|
+
return this.fail('UNEXPECTED_ERROR', `Drift evaluation failed: ${message}`);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
async runScheduledProcessSweep(params, provider, thresholds) {
|
|
273
|
+
const rv = RunView.FromMetadataProvider(provider);
|
|
274
|
+
const processesRes = await rv.RunView({
|
|
275
|
+
EntityName: 'MJ: Record Processes',
|
|
276
|
+
ExtraFilter: "Status = 'Active' AND WorkType IN ('ML Model', 'Infer')",
|
|
277
|
+
Fields: ['ID', 'Name', 'WorkType', 'Status'],
|
|
278
|
+
OrderBy: 'Name ASC, ID ASC',
|
|
279
|
+
ResultType: 'simple',
|
|
280
|
+
}, params.ContextUser);
|
|
281
|
+
if (!processesRes.Success) {
|
|
282
|
+
throw new Error(`Failed to load active MJ: Record Processes for drift sweep: ${processesRes.ErrorMessage ?? 'unknown error'}`);
|
|
283
|
+
}
|
|
284
|
+
const activeProcesses = processesRes.Results ?? [];
|
|
285
|
+
const baselineWindowEnd = this.getStringParam(params, 'BaselineWindowEnd');
|
|
286
|
+
const evaluationWindowStart = this.getStringParam(params, 'EvaluationWindowStart');
|
|
287
|
+
const emitAlertOnDrift = this.getBooleanParam(params, 'EmitAlertOnDrift', true);
|
|
288
|
+
const activeEmitter = EvaluateFeatureAndPredictionDriftAction_1.defaultAlertEmitter ??
|
|
289
|
+
new DefaultDriftAlertEmitter(provider);
|
|
290
|
+
let overallSeverity = 'None';
|
|
291
|
+
let maxPSI = 0;
|
|
292
|
+
const driftedFeatures = [];
|
|
293
|
+
const featureResults = [];
|
|
294
|
+
const processResults = [];
|
|
295
|
+
let shouldAlert = false;
|
|
296
|
+
let insufficientData = activeProcesses.length === 0;
|
|
297
|
+
let alertEmitted = false;
|
|
298
|
+
let firstAlertId;
|
|
299
|
+
let failedCount = 0;
|
|
300
|
+
const loads = await LoadFeatureAndPredictionDriftForRecordProcesses(activeProcesses.map((proc) => proc.ID), {
|
|
301
|
+
BaselineWindowEnd: baselineWindowEnd,
|
|
302
|
+
EvaluationWindowStart: evaluationWindowStart,
|
|
303
|
+
Provider: provider,
|
|
304
|
+
ContextUser: params.ContextUser,
|
|
305
|
+
WarningPSIThreshold: thresholds.warningThreshold,
|
|
306
|
+
CriticalPSIThreshold: thresholds.criticalThreshold,
|
|
307
|
+
Epsilon: thresholds.epsilon,
|
|
308
|
+
MinSampleSize: thresholds.minSampleSize,
|
|
309
|
+
MaxRows: thresholds.maxRows,
|
|
310
|
+
});
|
|
311
|
+
for (const [i, proc] of activeProcesses.entries()) {
|
|
312
|
+
const load = loads[i];
|
|
313
|
+
if (!load?.Input) {
|
|
314
|
+
const message = load?.ErrorMessage ?? 'no load result';
|
|
315
|
+
LogError(`Drift sweep: record process '${proc.Name}' (${proc.ID}) was not evaluated: ${message}`);
|
|
316
|
+
failedCount++;
|
|
317
|
+
processResults.push({
|
|
318
|
+
RecordProcessID: proc.ID,
|
|
319
|
+
ProcessName: proc.Name,
|
|
320
|
+
WorkType: proc.WorkType,
|
|
321
|
+
OverallSeverity: 'None',
|
|
322
|
+
MaxPSI: 0,
|
|
323
|
+
ShouldAlert: false,
|
|
324
|
+
InsufficientData: true,
|
|
325
|
+
Truncated: false,
|
|
326
|
+
AlertEmitted: false,
|
|
327
|
+
ErrorMessage: message,
|
|
328
|
+
Summary: `Not evaluated: ${message}`,
|
|
329
|
+
});
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
const report = EvaluateFeatureAndPredictionDrift(load.Input);
|
|
333
|
+
if (SEVERITY_RANK[report.OverallSeverity] > SEVERITY_RANK[overallSeverity]) {
|
|
334
|
+
overallSeverity = report.OverallSeverity;
|
|
335
|
+
}
|
|
336
|
+
if (report.MaxPSI > maxPSI) {
|
|
337
|
+
maxPSI = report.MaxPSI;
|
|
338
|
+
}
|
|
339
|
+
driftedFeatures.push(...report.DriftedFeatures);
|
|
340
|
+
featureResults.push(...report.FeatureResults);
|
|
341
|
+
if (report.ShouldAlert) {
|
|
342
|
+
shouldAlert = true;
|
|
343
|
+
}
|
|
344
|
+
if (report.InsufficientData) {
|
|
345
|
+
insufficientData = true;
|
|
346
|
+
}
|
|
347
|
+
let procAlertEmitted = false;
|
|
348
|
+
let procAlertId;
|
|
349
|
+
if (report.ShouldAlert && emitAlertOnDrift) {
|
|
350
|
+
const alertOutcome = await activeEmitter.EmitDriftAlert(report, params, {
|
|
351
|
+
recordProcessId: proc.ID,
|
|
352
|
+
});
|
|
353
|
+
procAlertEmitted = alertOutcome.Emitted;
|
|
354
|
+
procAlertId = alertOutcome.AlertID;
|
|
355
|
+
if (procAlertEmitted) {
|
|
356
|
+
alertEmitted = true;
|
|
357
|
+
firstAlertId = firstAlertId ?? procAlertId;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
processResults.push({
|
|
361
|
+
RecordProcessID: proc.ID,
|
|
362
|
+
ProcessName: proc.Name,
|
|
363
|
+
WorkType: proc.WorkType,
|
|
364
|
+
OverallSeverity: report.OverallSeverity,
|
|
365
|
+
MaxPSI: report.MaxPSI,
|
|
366
|
+
ShouldAlert: report.ShouldAlert,
|
|
367
|
+
InsufficientData: report.InsufficientData,
|
|
368
|
+
Truncated: report.Truncated === true,
|
|
369
|
+
AlertEmitted: procAlertEmitted,
|
|
370
|
+
AlertID: procAlertId,
|
|
371
|
+
DivergenceMetrics: report.DivergenceMetrics,
|
|
372
|
+
Summary: report.Summary,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
const summary = `ProcessesEvaluated=${processResults.length - failedCount}, ProcessesFailed=${failedCount}, ` +
|
|
376
|
+
`OverallSeverity=${overallSeverity}, MaxPSI=${maxPSI.toFixed(4)}, DriftedFeatures=${driftedFeatures.length}`;
|
|
377
|
+
this.addOutputParam(params, 'OverallSeverity', overallSeverity);
|
|
378
|
+
this.addOutputParam(params, 'MaxPSI', maxPSI);
|
|
379
|
+
this.addOutputParam(params, 'DriftedFeatures', driftedFeatures);
|
|
380
|
+
this.addOutputParam(params, 'FeatureResults', featureResults);
|
|
381
|
+
// DivergenceMetrics is per process in a sweep: see each ProcessResults entry.
|
|
382
|
+
this.addOutputParam(params, 'ShouldAlert', shouldAlert);
|
|
383
|
+
this.addOutputParam(params, 'InsufficientData', insufficientData);
|
|
384
|
+
this.addOutputParam(params, 'AlertEmitted', alertEmitted);
|
|
385
|
+
if (firstAlertId) {
|
|
386
|
+
this.addOutputParam(params, 'AlertID', firstAlertId);
|
|
387
|
+
}
|
|
388
|
+
this.addOutputParam(params, 'ProcessResults', processResults);
|
|
389
|
+
this.addOutputParam(params, 'Summary', summary);
|
|
390
|
+
return this.ok(params, summary);
|
|
391
|
+
}
|
|
392
|
+
parseNumericFeatures(raw) {
|
|
393
|
+
if (!raw) {
|
|
394
|
+
return undefined;
|
|
395
|
+
}
|
|
396
|
+
const result = {};
|
|
397
|
+
for (const [key, val] of Object.entries(raw)) {
|
|
398
|
+
if (typeof val === 'object' && val !== null && !Array.isArray(val)) {
|
|
399
|
+
const rec = val;
|
|
400
|
+
const baseline = this.toNullableNumberArray(rec['Baseline']);
|
|
401
|
+
const evaluation = this.toNullableNumberArray(rec['Evaluation']);
|
|
402
|
+
const bins = typeof rec['Bins'] === 'number' ? rec['Bins'] : undefined;
|
|
403
|
+
result[key] = { Baseline: baseline, Evaluation: evaluation, Bins: bins };
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
407
|
+
}
|
|
408
|
+
parseCategoricalFeatures(raw) {
|
|
409
|
+
if (!raw) {
|
|
410
|
+
return undefined;
|
|
411
|
+
}
|
|
412
|
+
const result = {};
|
|
413
|
+
for (const [key, val] of Object.entries(raw)) {
|
|
414
|
+
if (typeof val === 'object' && val !== null && !Array.isArray(val)) {
|
|
415
|
+
const rec = val;
|
|
416
|
+
const baseline = this.toNullableStringArray(rec['Baseline']);
|
|
417
|
+
const evaluation = this.toNullableStringArray(rec['Evaluation']);
|
|
418
|
+
result[key] = { Baseline: baseline, Evaluation: evaluation };
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
422
|
+
}
|
|
423
|
+
parsePrebinnedFeatures(raw) {
|
|
424
|
+
if (!raw) {
|
|
425
|
+
return undefined;
|
|
426
|
+
}
|
|
427
|
+
const result = {};
|
|
428
|
+
for (const [key, val] of Object.entries(raw)) {
|
|
429
|
+
if (typeof val === 'object' && val !== null && !Array.isArray(val)) {
|
|
430
|
+
const rec = val;
|
|
431
|
+
const baseline = this.toNumberArray(rec['BaselineProportions']);
|
|
432
|
+
const evaluation = this.toNumberArray(rec['EvaluationProportions']);
|
|
433
|
+
const baseSampleCount = typeof rec['BaselineSampleCount'] === 'number' ? rec['BaselineSampleCount'] : undefined;
|
|
434
|
+
const evalSampleCount = typeof rec['EvaluationSampleCount'] === 'number' ? rec['EvaluationSampleCount'] : undefined;
|
|
435
|
+
result[key] = {
|
|
436
|
+
BaselineProportions: baseline,
|
|
437
|
+
EvaluationProportions: evaluation,
|
|
438
|
+
BaselineSampleCount: baseSampleCount,
|
|
439
|
+
EvaluationSampleCount: evalSampleCount,
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
444
|
+
}
|
|
445
|
+
parseConfidenceAndDivergence(raw) {
|
|
446
|
+
if (!raw) {
|
|
447
|
+
return undefined;
|
|
448
|
+
}
|
|
449
|
+
const pairsRaw = Array.isArray(raw['Pairs']) ? raw['Pairs'] : [];
|
|
450
|
+
const pairs = [];
|
|
451
|
+
for (const item of pairsRaw) {
|
|
452
|
+
if (typeof item === 'object' && item !== null) {
|
|
453
|
+
const rec = item;
|
|
454
|
+
pairs.push({
|
|
455
|
+
RecordID: typeof rec['RecordID'] === 'string' ? rec['RecordID'] : undefined,
|
|
456
|
+
ChampionScore: typeof rec['ChampionScore'] === 'number' ? rec['ChampionScore'] : undefined,
|
|
457
|
+
ChallengerScore: typeof rec['ChallengerScore'] === 'number' ? rec['ChallengerScore'] : undefined,
|
|
458
|
+
ChampionLabel: typeof rec['ChampionLabel'] === 'string' ? rec['ChampionLabel'] : undefined,
|
|
459
|
+
ChallengerLabel: typeof rec['ChallengerLabel'] === 'string' ? rec['ChallengerLabel'] : undefined,
|
|
460
|
+
ChampionLatencyMs: typeof rec['ChampionLatencyMs'] === 'number' ? rec['ChampionLatencyMs'] : undefined,
|
|
461
|
+
ChallengerLatencyMs: typeof rec['ChallengerLatencyMs'] === 'number' ? rec['ChallengerLatencyMs'] : undefined,
|
|
462
|
+
TimedOut: typeof rec['TimedOut'] === 'boolean' ? rec['TimedOut'] : undefined,
|
|
463
|
+
ErrorMessage: typeof rec['ErrorMessage'] === 'string' ? rec['ErrorMessage'] : undefined,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
const problemType = raw['ProblemType'] === 'classification' || raw['ProblemType'] === 'regression'
|
|
468
|
+
? raw['ProblemType']
|
|
469
|
+
: undefined;
|
|
470
|
+
return {
|
|
471
|
+
BaselineConfidences: Array.isArray(raw['BaselineConfidences'])
|
|
472
|
+
? this.toNumberArray(raw['BaselineConfidences'])
|
|
473
|
+
: undefined,
|
|
474
|
+
EvaluationConfidences: Array.isArray(raw['EvaluationConfidences'])
|
|
475
|
+
? this.toNumberArray(raw['EvaluationConfidences'])
|
|
476
|
+
: undefined,
|
|
477
|
+
ConfidenceFloor: typeof raw['ConfidenceFloor'] === 'number' ? raw['ConfidenceFloor'] : undefined,
|
|
478
|
+
MaxBelowFloorRate: typeof raw['MaxBelowFloorRate'] === 'number' ? raw['MaxBelowFloorRate'] : undefined,
|
|
479
|
+
MaxMeanConfidenceDrop: typeof raw['MaxMeanConfidenceDrop'] === 'number' ? raw['MaxMeanConfidenceDrop'] : undefined,
|
|
480
|
+
Pairs: pairs.length > 0 ? pairs : undefined,
|
|
481
|
+
MinAgreementRate: typeof raw['MinAgreementRate'] === 'number' ? raw['MinAgreementRate'] : undefined,
|
|
482
|
+
MaxMeanAbsoluteScoreDelta: typeof raw['MaxMeanAbsoluteScoreDelta'] === 'number' ? raw['MaxMeanAbsoluteScoreDelta'] : undefined,
|
|
483
|
+
MaxP95LatencyRatio: typeof raw['MaxP95LatencyRatio'] === 'number' ? raw['MaxP95LatencyRatio'] : undefined,
|
|
484
|
+
ProblemType: problemType,
|
|
485
|
+
ScoreAgreementTolerance: typeof raw['ScoreAgreementTolerance'] === 'number' ? raw['ScoreAgreementTolerance'] : undefined,
|
|
486
|
+
MinSampleSize: typeof raw['MinSampleSize'] === 'number' ? raw['MinSampleSize'] : undefined,
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
toNumberArray(val) {
|
|
490
|
+
if (!Array.isArray(val)) {
|
|
491
|
+
return [];
|
|
492
|
+
}
|
|
493
|
+
return val.filter((v) => typeof v === 'number' && Number.isFinite(v));
|
|
494
|
+
}
|
|
495
|
+
toNullableNumberArray(val) {
|
|
496
|
+
if (!Array.isArray(val)) {
|
|
497
|
+
return [];
|
|
498
|
+
}
|
|
499
|
+
return val.map((v) => (typeof v === 'number' && Number.isFinite(v) ? v : null));
|
|
500
|
+
}
|
|
501
|
+
toNullableStringArray(val) {
|
|
502
|
+
if (!Array.isArray(val)) {
|
|
503
|
+
return [];
|
|
504
|
+
}
|
|
505
|
+
return val.map((v) => (v === null || v === undefined ? null : String(v)));
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
EvaluateFeatureAndPredictionDriftAction = EvaluateFeatureAndPredictionDriftAction_1 = __decorate([
|
|
509
|
+
RegisterClass(BaseAction, EVALUATE_DRIFT_DRIVER_CLASS)
|
|
510
|
+
], EvaluateFeatureAndPredictionDriftAction);
|
|
511
|
+
export { EvaluateFeatureAndPredictionDriftAction };
|
|
512
|
+
//# sourceMappingURL=evaluate-drift.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-drift.action.js","sourceRoot":"","sources":["../../src/actions/evaluate-drift.action.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;;;;;;;;AAGH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAyC,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EACL,kBAAkB,GAInB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAEtE,OAAO,EAAE,0BAA0B,EAAmB,MAAM,iCAAiC,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,+CAA+C,EAC/C,8CAA8C,GAQ/C,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAuB/D,MAAM,aAAa,GAAkC;IACnD,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;CACZ,CAAC;AAuBF,wFAAwF;AACxF,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,OAAO,wBAAwB;IACnC,YAA6B,QAA4B;QAA5B,aAAQ,GAAR,QAAQ,CAAoB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I,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;;AA/aU,uCAAuC;IADnD,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;GAC1C,uCAAuC,CAgbnD"}
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* - {@link PredictiveStudioRunExperimentAction} → `PredictiveStudioRunExperimentAction`
|
|
19
19
|
* - {@link PredictiveStudioPromoteModelAction} → `PredictiveStudioPromoteModelAction`
|
|
20
20
|
* - {@link PredictiveStudioScheduleModelScoringAction} → `PredictiveStudioScheduleModelScoringAction`
|
|
21
|
+
* - {@link PredictiveStudioMigratePipelinesAction} → `PredictiveStudioMigratePipelinesAction`
|
|
21
22
|
*/
|
|
22
23
|
export * from './base-predictive-studio.action.js';
|
|
23
24
|
export * from './train-model.action.js';
|
|
@@ -29,6 +30,8 @@ export * from './promote-model.action.js';
|
|
|
29
30
|
export * from './promote-model.gate.js';
|
|
30
31
|
export * from './model-scoring-action-generator.js';
|
|
31
32
|
export * from './schedule-model-scoring.action.js';
|
|
33
|
+
export * from './evaluate-drift.action.js';
|
|
34
|
+
export * from './migrate-pipelines.action.js';
|
|
32
35
|
/**
|
|
33
36
|
* Tree-shaking anchor — call from a server bootstrap to guarantee the
|
|
34
37
|
* `@RegisterClass(BaseAction, ...)` registrations are not eliminated by the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAU3C;;;;;GAKG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAQlD"}
|
package/dist/actions/index.js
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* - {@link PredictiveStudioRunExperimentAction} → `PredictiveStudioRunExperimentAction`
|
|
19
19
|
* - {@link PredictiveStudioPromoteModelAction} → `PredictiveStudioPromoteModelAction`
|
|
20
20
|
* - {@link PredictiveStudioScheduleModelScoringAction} → `PredictiveStudioScheduleModelScoringAction`
|
|
21
|
+
* - {@link PredictiveStudioMigratePipelinesAction} → `PredictiveStudioMigratePipelinesAction`
|
|
21
22
|
*/
|
|
22
23
|
export * from './base-predictive-studio.action.js';
|
|
23
24
|
export * from './train-model.action.js';
|
|
@@ -29,11 +30,15 @@ export * from './promote-model.action.js';
|
|
|
29
30
|
export * from './promote-model.gate.js';
|
|
30
31
|
export * from './model-scoring-action-generator.js';
|
|
31
32
|
export * from './schedule-model-scoring.action.js';
|
|
33
|
+
export * from './evaluate-drift.action.js';
|
|
34
|
+
export * from './migrate-pipelines.action.js';
|
|
32
35
|
import { PredictiveStudioTrainModelAction } from './train-model.action.js';
|
|
33
36
|
import { PredictiveStudioScoreRecordSetAction } from './score-record-set.action.js';
|
|
34
37
|
import { PredictiveStudioRunExperimentAction } from './run-experiment.action.js';
|
|
35
38
|
import { PredictiveStudioPromoteModelAction } from './promote-model.action.js';
|
|
36
39
|
import { PredictiveStudioScheduleModelScoringAction } from './schedule-model-scoring.action.js';
|
|
40
|
+
import { EvaluateFeatureAndPredictionDriftAction } from './evaluate-drift.action.js';
|
|
41
|
+
import { PredictiveStudioMigratePipelinesAction } from './migrate-pipelines.action.js';
|
|
37
42
|
/**
|
|
38
43
|
* Tree-shaking anchor — call from a server bootstrap to guarantee the
|
|
39
44
|
* `@RegisterClass(BaseAction, ...)` registrations are not eliminated by the
|
|
@@ -46,5 +51,7 @@ export function LoadPredictiveStudioActions() {
|
|
|
46
51
|
void PredictiveStudioRunExperimentAction;
|
|
47
52
|
void PredictiveStudioPromoteModelAction;
|
|
48
53
|
void PredictiveStudioScheduleModelScoringAction;
|
|
54
|
+
void EvaluateFeatureAndPredictionDriftAction;
|
|
55
|
+
void PredictiveStudioMigratePipelinesAction;
|
|
49
56
|
}
|
|
50
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAE3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,oCAAoC,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,0CAA0C,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAE,uCAAuC,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,sCAAsC,EAAE,MAAM,4BAA4B,CAAC;AAEpF;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B;IACzC,KAAK,gCAAgC,CAAC;IACtC,KAAK,oCAAoC,CAAC;IAC1C,KAAK,mCAAmC,CAAC;IACzC,KAAK,kCAAkC,CAAC;IACxC,KAAK,0CAA0C,CAAC;IAChD,KAAK,uCAAuC,CAAC;IAC7C,KAAK,sCAAsC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module actions/migrate-pipelines.action
|
|
3
|
+
*
|
|
4
|
+
* The data migration as an Action: every ML Training Pipeline without a Prediction Unit or an Evaluation Protocol gets
|
|
5
|
+
* version 1 of both, is archived, or is held, with the reason. Dry run by default; the release procedure runs the dry
|
|
6
|
+
* run and the real run and compares their counts.
|
|
7
|
+
*/
|
|
8
|
+
import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
9
|
+
import { type MigrationDeps } from '../migration/legacy-pipeline-migration.js';
|
|
10
|
+
import { BasePredictiveStudioAction } from './base-predictive-studio.action.js';
|
|
11
|
+
export { MIGRATE_PIPELINES_DRIVER_CLASS } from './driver-classes.js';
|
|
12
|
+
/** Data migration: every pipeline gets a Prediction Unit and an Evaluation Protocol, is archived, or is held — with the reason. */
|
|
13
|
+
export declare class PredictiveStudioMigratePipelinesAction extends BasePredictiveStudioAction {
|
|
14
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
15
|
+
/** The migration's deps from the run params (the request's provider and user); overridable so tests inject fakes. */
|
|
16
|
+
protected BuildMigrationDeps(params: RunActionParams): MigrationDeps;
|
|
17
|
+
private writeOutputs;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=migrate-pipelines.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-pipelines.action.d.ts","sourceRoot":"","sources":["../../src/actions/migrate-pipelines.action.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAKxF,OAAO,EAAqB,KAAK,aAAa,EAAqB,MAAM,wCAAwC,CAAC;AAElH,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAGlE,mIAAmI;AACnI,qBACa,sCAAuC,SAAQ,0BAA0B;cACpE,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAevF,qHAAqH;IACrH,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa;IAKpE,OAAO,CAAC,YAAY;CAQrB"}
|