Skip to main content

PredictionQuery

Defines a predictive query in PQL against a graph.

ml.prokrust.ai/v1beta1 · Namespaced · predictionqueries

Controller status​

Conditions​

Controller checks for this resource. Read the type, status, reason, and observed generation to diagnose the current state.

ConditionWhat it tells you
AcceptedReports whether the query passed validation for this pass. Parsing can succeed while compilation waits for a graph or table.
DependenciesReadyReports whether the graph, table definitions, and publication dependencies are ready.
ReadyReports whether the controller compiled and published the definition for this generation.

A ready query can still have warnings. Read status.diagnostics after publication.

PQL parsing failed

The PQL parser rejected the expression ?. The controller reports the parser error for the current generation.

status:
conditions:
- type: Accepted
status: "False"
reason: InvalidSpec
message: unexpected character
observedGeneration: 1
- type: DependenciesReady
status: Unknown
reason: NotEvaluated
message: Dependencies are not evaluated for an invalid spec.
observedGeneration: 1
- type: Ready
status: "False"
reason: Invalid
message: unexpected character
observedGeneration: 1

Use the field and source span in status.diagnostics to locate the error. After editing spec.pql, check Ready at the new generation.

PredictionQuery condition results and reasons

Accepted​

Status and reasonWhat to check
False / InvalidSpecRead status.diagnostics. Use the code, field, and source span to correct spec.pql.
True / ValidSpecThe specification passed validation for this pass. Check dependencies and publication.

DependenciesReady​

Status and reasonWhat to check
False / DependencyNotReadyInspect the graph, table definition, or publication dependency named in the message.
True / ReadyThe required dependencies resolved. Check Ready for publication.
Unknown / NotEvaluatedCorrect the query error in status.diagnostics before checking dependencies.

Ready​

Status and reasonWhat to check
False / BlockedInspect the graph, table definition, or publication dependency named in the message.
False / InvalidRead status.diagnostics. Use the code, field, and source span to correct spec.pql.
True / ReadyInspect status.normalizedAst and status.taskDescriptor for the compiled artifacts. Check status.task for the inferred prediction task.
Condition field meanings
FieldWhat to look for
typeNames the check. Use it to select the condition you want to inspect.
statusReports whether the named condition holds. Read the reason to see why.
reasonA short identifier for this outcome. Use it when comparing observations or filtering results.
messageWhen present, gives details about this object, such as the name of a dependency.
observedGenerationCompare with metadata.generation to see which version of the spec the controller checked.
lastTransitionTimeRecords the time of the last transition for this condition.
How to read status fields
FieldWhat it tells you
status.artifactPublished query definition. Inspect it to identify the validated query used by training and prediction.
status.canonicalPqlNormalized query text produced by validation. Inspect it when comparing equivalent query definitions.
status.diagnosticsController findings about this resource. Use the message and field, when available, to locate a validation or execution problem.
status.graphDigestIdentifies the graph definition used to validate the query. Compare it when determining whether a graph revision changed.
status.lastReconcileTimeTime of the most recent reconciliation, when reported. Use the observed generation to check whether it covers the current spec.
status.modeStatic or temporal query mode determined during validation. Inspect it to check the time semantics used for this query.
status.normalizedAstValidated representation of the parsed PQL query. Inspect it when diagnosing how Prokrust interpreted the query.
status.observedGenerationResource generation evaluated by the controller. Compare it with metadata.generation to check whether the status covers the current spec.
status.phaseCurrent stage reported by the controller. Use the conditions or failure details to diagnose why progress stopped.
status.previousReadyRetains the last successful definition when available. Check its generation and digest before using that artifact.
status.semanticDigestDigest of the interpreted definition. Check readiness and generation before using it to pin a dependent resource.
status.taskPrediction task inferred from the query. Inspect it when selecting a compatible training configuration.
status.taskDescriptorVersioned task descriptor, published only after successful analysis.
Kubernetes schema for status

Required applies when the parent is present. A dash in the default column means the CRD declares no default.

FieldTypeRequiredDefaultSchema constraints and descriptions
statusobjectno—maxProperties 1024 · nullable true
status.artifactobjectno—Published query definition. Inspect it to identify the validated query used by training and prediction. · maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991
status.artifact.digeststringyes—SHA-256 digest of the artifact contents. Compare it with the downloaded bytes to verify the artifact. · maxLength 71 · pattern "^sha256:[0-9a-f]{64}$" · self.matches('^sha256:[0-9a-f]{64}$')
status.artifact.mediaTypestringyes—Use the recorded media type to identify the artifact representation. · maxLength 2048
status.artifact.sizeBytesintegeryes—Use the published byte count when verifying a transferred artifact. · format "int64"
status.artifact.uristringyes—Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048
status.canonicalPqlstringno—Normalized query text produced by validation. Inspect it when comparing equivalent query definitions. · maxLength 2048 · nullable true
status.conditionsarrayno—Controller checks for this resource. Read the type, status, reason, and observed generation to diagnose the current state. · maxItems 8
status.conditions[]object——maxProperties 1024
status.conditions[].lastTransitionTimestringyes—maxLength 2048
status.conditions[].messagestringyes—maxLength 1024
status.conditions[].observedGenerationintegeryes—format "int64"
status.conditions[].reasonstringyes—maxLength 128
status.conditions[].statusstringyes—enum ["True","False","Unknown"] · maxLength 2048
status.conditions[].typestringyes—maxLength 2048
status.diagnosticsarrayno—Controller findings about this resource. Use the message and field, when available, to locate a validation or execution problem. · maxItems 12
status.diagnostics[]object——maxProperties 1024
status.diagnostics[].codestringyes—maxLength 128
status.diagnostics[].fieldstringno—maxLength 2048 · nullable true
status.diagnostics[].messagestringyes—maxLength 1024
status.diagnostics[].relatedResourceobjectno—maxProperties 1024 · nullable true
status.diagnostics[].relatedResource.namestringyes—Kubernetes name of the referenced object in the same namespace. Use its metadata.name. · maxLength 253
status.diagnostics[].severitystringyes—enum ["Error","Warning","Info"] · maxLength 2048
status.diagnostics[].sourceSpanobjectno—maxProperties 1024 · nullable true
status.diagnostics[].sourceSpan.endByteintegeryes—format "int64"
status.diagnostics[].sourceSpan.endColumnintegeryes—format "int64"
status.diagnostics[].sourceSpan.endLineintegeryes—format "int64"
status.diagnostics[].sourceSpan.startByteintegeryes—format "int64"
status.diagnostics[].sourceSpan.startColumnintegeryes—format "int64"
status.diagnostics[].sourceSpan.startLineintegeryes—format "int64"
status.graphDigeststringno—Identifies the graph definition used to validate the query. Compare it when determining whether a graph revision changed. · maxLength 71 · nullable true · pattern "^sha256:[0-9a-f]{64}$"
status.lastReconcileTimestringno—Time of the most recent reconciliation, when reported. Use the observed generation to check whether it covers the current spec. · maxLength 2048 · nullable true
status.modestringno—Static or temporal query mode determined during validation. Inspect it to check the time semantics used for this query. · enum ["Static","Temporal",null] · maxLength 2048 · nullable true
status.normalizedAstobjectno—Validated representation of the parsed PQL query. Inspect it when diagnosing how Prokrust interpreted the query. · maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991
status.normalizedAst.digeststringyes—SHA-256 digest of the artifact contents. Compare it with the downloaded bytes to verify the artifact. · maxLength 71 · pattern "^sha256:[0-9a-f]{64}$" · self.matches('^sha256:[0-9a-f]{64}$')
status.normalizedAst.mediaTypestringyes—Use the recorded media type to identify the artifact representation. · maxLength 2048
status.normalizedAst.sizeBytesintegeryes—Use the published byte count when verifying a transferred artifact. · format "int64"
status.normalizedAst.uristringyes—Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048
status.observedGenerationintegerno—Resource generation evaluated by the controller. Compare it with metadata.generation to check whether the status covers the current spec. · format "int64" · nullable true
status.phasestringno—Current stage reported by the controller. Use the conditions or failure details to diagnose why progress stopped. · enum ["Pending","Validating","Blocked","Publishing","Ready","Invalid","Degraded",null] · maxLength 2048 · nullable true
status.previousReadyobjectno—Retains the last successful definition when available. Check its generation and digest before using that artifact. · maxProperties 1024 · nullable true
status.previousReady.artifactobjectno—maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991
status.previousReady.artifact.digeststringyes—SHA-256 digest of the artifact contents. Compare it with the downloaded bytes to verify the artifact. · maxLength 71 · pattern "^sha256:[0-9a-f]{64}$" · self.matches('^sha256:[0-9a-f]{64}$')
status.previousReady.artifact.mediaTypestringyes—Use the recorded media type to identify the artifact representation. · maxLength 2048
status.previousReady.artifact.sizeBytesintegeryes—Use the published byte count when verifying a transferred artifact. · format "int64"
status.previousReady.artifact.uristringyes—Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048
status.previousReady.generationintegeryes—format "int64"
status.previousReady.semanticDigeststringyes—maxLength 71 · pattern "^sha256:[0-9a-f]{64}$"
status.semanticDigeststringno—Digest of the interpreted definition. Check readiness and generation before using it to pin a dependent resource. · maxLength 71 · nullable true · pattern "^sha256:[0-9a-f]{64}$"
status.taskstringno—Prediction task inferred from the query. Inspect it when selecting a compatible training configuration. · enum ["Regression","BinaryClassification","MulticlassClassification","MultilabelClassification","CategoryRanking","StaticLinkPrediction","TemporalLinkPrediction","Forecast",null] · maxLength 2048 · nullable true
status.taskDescriptorobjectno—Versioned task descriptor, published only after successful analysis. · maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991
status.taskDescriptor.digeststringyes—SHA-256 digest of the artifact contents. Compare it with the downloaded bytes to verify the artifact. · maxLength 71 · pattern "^sha256:[0-9a-f]{64}$" · self.matches('^sha256:[0-9a-f]{64}$')
status.taskDescriptor.mediaTypestringyes—Use the recorded media type to identify the artifact representation. · maxLength 2048
status.taskDescriptor.sizeBytesintegeryes—Use the published byte count when verifying a transferred artifact. · format "int64"
status.taskDescriptor.uristringyes—Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048

Specification​

Bind a PQL query to the workspace graph whose aliases the query uses.

This resource requires graphRef, pql.

graphRef​

Select the graph that supplies the tables and relations available to the query.

FieldWhen to use it
spec.graphRef.nameKubernetes name of the referenced object in the same namespace. Use its metadata.name.

pql​

Write the predictive query in PQL. Change it to select another target, population, or prediction task.

Kubernetes schema for spec

Required applies when the parent is present. A dash in the default column means the CRD declares no default.

FieldTypeRequiredDefaultSchema constraints and descriptions
specobjectyes—Bind a PQL query to the workspace graph whose aliases the query uses. · maxProperties 1024
spec.graphRefobjectyes—Select the graph that supplies the tables and relations available to the query. · maxProperties 1024
spec.graphRef.namestringyes—Kubernetes name of the referenced object in the same namespace. Use its metadata.name. · maxLength 253
spec.pqlstringyes—Write the predictive query in PQL. Change it to select another target, population, or prediction task. · maxLength 16384

The validation schema matches prokrust-crds 0.23.0-rc.1.