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.
| Condition | What it tells you |
|---|---|
Accepted | Reports whether the query passed validation for this pass. Parsing can succeed while compilation waits for a graph or table. |
DependenciesReady | Reports whether the graph, table definitions, and publication dependencies are ready. |
Ready | Reports 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 reason | What to check |
|---|---|
False / InvalidSpec | Read status.diagnostics. Use the code, field, and source span to correct spec.pql. |
True / ValidSpec | The specification passed validation for this pass. Check dependencies and publication. |
DependenciesReady
| Status and reason | What to check |
|---|---|
False / DependencyNotReady | Inspect the graph, table definition, or publication dependency named in the message. |
True / Ready | The required dependencies resolved. Check Ready for publication. |
Unknown / NotEvaluated | Correct the query error in status.diagnostics before checking dependencies. |
Ready
| Status and reason | What to check |
|---|---|
False / Blocked | Inspect the graph, table definition, or publication dependency named in the message. |
False / Invalid | Read status.diagnostics. Use the code, field, and source span to correct spec.pql. |
True / Ready | Inspect status.normalizedAst and status.taskDescriptor for the compiled artifacts. Check status.task for the inferred prediction task. |
Condition field meanings
| Field | What to look for |
|---|---|
type | Names the check. Use it to select the condition you want to inspect. |
status | Reports whether the named condition holds. Read the reason to see why. |
reason | A short identifier for this outcome. Use it when comparing observations or filtering results. |
message | When present, gives details about this object, such as the name of a dependency. |
observedGeneration | Compare with metadata.generation to see which version of the spec the controller checked. |
lastTransitionTime | Records the time of the last transition for this condition. |
How to read status fields
| Field | What it tells you |
|---|---|
status.artifact | Published query definition. Inspect it to identify the validated query used by training and prediction. |
status.canonicalPql | Normalized query text produced by validation. Inspect it when comparing equivalent query definitions. |
status.diagnostics | Controller findings about this resource. Use the message and field, when available, to locate a validation or execution problem. |
status.graphDigest | Identifies the graph definition used to validate the query. Compare it when determining whether a graph revision changed. |
status.lastReconcileTime | Time of the most recent reconciliation, when reported. Use the observed generation to check whether it covers the current spec. |
status.mode | Static or temporal query mode determined during validation. Inspect it to check the time semantics used for this query. |
status.normalizedAst | Validated representation of the parsed PQL query. Inspect it when diagnosing how Prokrust interpreted the query. |
status.observedGeneration | Resource generation evaluated by the controller. Compare it with metadata.generation to check whether the status covers the current spec. |
status.phase | Current stage reported by the controller. Use the conditions or failure details to diagnose why progress stopped. |
status.previousReady | Retains the last successful definition when available. Check its generation and digest before using that artifact. |
status.semanticDigest | Digest of the interpreted definition. Check readiness and generation before using it to pin a dependent resource. |
status.task | Prediction task inferred from the query. Inspect it when selecting a compatible training configuration. |
status.taskDescriptor | Versioned 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.
| Field | Type | Required | Default | Schema constraints and descriptions |
|---|---|---|---|---|
status | object | no | — | maxProperties 1024 · nullable true |
status.artifact | object | no | — | 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.digest | string | yes | — | 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.mediaType | string | yes | — | Use the recorded media type to identify the artifact representation. · maxLength 2048 |
status.artifact.sizeBytes | integer | yes | — | Use the published byte count when verifying a transferred artifact. · format "int64" |
status.artifact.uri | string | yes | — | Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048 |
status.canonicalPql | string | no | — | Normalized query text produced by validation. Inspect it when comparing equivalent query definitions. · maxLength 2048 · nullable true |
status.conditions | array | no | — | 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[].lastTransitionTime | string | yes | — | maxLength 2048 |
status.conditions[].message | string | yes | — | maxLength 1024 |
status.conditions[].observedGeneration | integer | yes | — | format "int64" |
status.conditions[].reason | string | yes | — | maxLength 128 |
status.conditions[].status | string | yes | — | enum ["True","False","Unknown"] · maxLength 2048 |
status.conditions[].type | string | yes | — | maxLength 2048 |
status.diagnostics | array | no | — | 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[].code | string | yes | — | maxLength 128 |
status.diagnostics[].field | string | no | — | maxLength 2048 · nullable true |
status.diagnostics[].message | string | yes | — | maxLength 1024 |
status.diagnostics[].relatedResource | object | no | — | maxProperties 1024 · nullable true |
status.diagnostics[].relatedResource.name | string | yes | — | Kubernetes name of the referenced object in the same namespace. Use its metadata.name. · maxLength 253 |
status.diagnostics[].severity | string | yes | — | enum ["Error","Warning","Info"] · maxLength 2048 |
status.diagnostics[].sourceSpan | object | no | — | maxProperties 1024 · nullable true |
status.diagnostics[].sourceSpan.endByte | integer | yes | — | format "int64" |
status.diagnostics[].sourceSpan.endColumn | integer | yes | — | format "int64" |
status.diagnostics[].sourceSpan.endLine | integer | yes | — | format "int64" |
status.diagnostics[].sourceSpan.startByte | integer | yes | — | format "int64" |
status.diagnostics[].sourceSpan.startColumn | integer | yes | — | format "int64" |
status.diagnostics[].sourceSpan.startLine | integer | yes | — | format "int64" |
status.graphDigest | string | no | — | 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.lastReconcileTime | string | no | — | 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.mode | string | no | — | 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.normalizedAst | object | no | — | 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.digest | string | yes | — | 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.mediaType | string | yes | — | Use the recorded media type to identify the artifact representation. · maxLength 2048 |
status.normalizedAst.sizeBytes | integer | yes | — | Use the published byte count when verifying a transferred artifact. · format "int64" |
status.normalizedAst.uri | string | yes | — | Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048 |
status.observedGeneration | integer | no | — | 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.phase | string | no | — | 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.previousReady | object | no | — | Retains the last successful definition when available. Check its generation and digest before using that artifact. · maxProperties 1024 · nullable true |
status.previousReady.artifact | object | no | — | maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991 |
status.previousReady.artifact.digest | string | yes | — | 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.mediaType | string | yes | — | Use the recorded media type to identify the artifact representation. · maxLength 2048 |
status.previousReady.artifact.sizeBytes | integer | yes | — | Use the published byte count when verifying a transferred artifact. · format "int64" |
status.previousReady.artifact.uri | string | yes | — | Use this location to identify the published artifact during retrieval or diagnostics. · maxLength 2048 |
status.previousReady.generation | integer | yes | — | format "int64" |
status.previousReady.semanticDigest | string | yes | — | maxLength 71 · pattern "^sha256:[0-9a-f]{64}$" |
status.semanticDigest | string | no | — | 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.task | string | no | — | 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.taskDescriptor | object | no | — | Versioned task descriptor, published only after successful analysis. · maxProperties 1024 · nullable true · self.sizeBytes >= 0 && self.sizeBytes <= 9007199254740991 |
status.taskDescriptor.digest | string | yes | — | 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.mediaType | string | yes | — | Use the recorded media type to identify the artifact representation. · maxLength 2048 |
status.taskDescriptor.sizeBytes | integer | yes | — | Use the published byte count when verifying a transferred artifact. · format "int64" |
status.taskDescriptor.uri | string | yes | — | 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.
| Field | When to use it |
|---|---|
spec.graphRef.name | Kubernetes 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.
| Field | Type | Required | Default | Schema constraints and descriptions |
|---|---|---|---|---|
spec | object | yes | — | Bind a PQL query to the workspace graph whose aliases the query uses. · maxProperties 1024 |
spec.graphRef | object | yes | — | Select the graph that supplies the tables and relations available to the query. · maxProperties 1024 |
spec.graphRef.name | string | yes | — | Kubernetes name of the referenced object in the same namespace. Use its metadata.name. · maxLength 253 |
spec.pql | string | yes | — | 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.