# graphTrainingPlan

A graph training plan record carrying name, executionPlan, gradient, optimizer, checkpoint, and related state.

Last updated: 2026-09-09

Package: compute.graph | Status: source-declared

Tags: compute, compute.graph, cpu, graph, method, source-example, thing, yeho

Describe compute work as an explicit graph with package-owned validation and scheduling metadata.

```yh
external thing graphTrainingPlan
```

- text name: Stores name as text.
- graphExecutionPlan executionPlan: Stores execution plan as graphExecutionPlan.
- graphGradientSpec gradient: Stores gradient as graphGradientSpec.
- graphOptimizerState optimizer: Stores optimizer as graphOptimizerState.
- graphCheckpointPolicy checkpoint: Stores checkpoint as graphCheckpointPolicy.
- graphReproducibilitySettings reproducibility: Stores reproducibility as graphReproducibilitySettings.
- text datasetKey: Stores dataset key as text.
- text note: Stores note as text.
- graphTrainingPlan(text name, graphExecutionPlan executionPlan, graphGradientSpec gradient, graphOptimizerState optimizer, graphCheckpointPolicy checkpoint, graphReproducibilitySettings reproducibility, text datasetKey, text note): Graph training plan.
- CanResume() returns bool: Can resume.
- CanReuseCache() returns bool: Can reuse cache.
- HasFallback() returns bool: Has fallback.
- CacheKey() returns text: Cache key.
- ReproducibilityKey() returns text: Reproducibility key.
- Describe() returns text: Describe.

## Use graphTrainingPlan

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using compute.graph

// Describe compute work as an explicit graph with package-owned validation and scheduling metadata.
graphTrainingPlan sample = graphTrainingPlan("Nova", graphExecutionPlan("Nova", graphModel("Nova", "model Kind", [], [], "note"), graphCachePolicy("key", "scope", true, true, "note"), graphFallbackPolicy("primary Path", "fallback Path", "reason", true, true, "note"), graphSchedulerRule("Nova", "path Order", "fusion Rule", "cache Rule", "note"), "note"), graphGradientSpec("Nova", "loss Kind", "target Kind", 1, true, "note"), graphOptimizerState("key", "optimizer Kind", "learning Rate", "momentum", "weight Decay", 1, "note"), graphCheckpointPolicy("key", "png", "location", true, true, true, 1, "note"), graphReproducibilitySettings("key", 1, true, true, true, "backend Policy", "note"), "dataset Key", "note")
Console.Log(Text.From(sample.name))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_graph__graphtrainingplan"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"

[[dependencies]]
package = "compute.device"
version = "0.1.0"
path = "../../../yeho/packages/compute/device"

[[dependencies]]
package = "compute.graph"
version = "0.1.0"
path = "../../../yeho/packages/compute/graph"

[[dependencies]]
package = "compute.kernels"
version = "0.1.0"
path = "../../../yeho/packages/compute/kernels"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.graph--graphTrainingPlan/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphTrainingPlan.CanResume

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.graph

// Can resume.
graphTrainingPlan instance = graphTrainingPlan("Nova", graphExecutionPlan("Nova", graphModel("Nova", "model Kind", [], [], "note"), graphCachePolicy("key", "scope", true, true, "note"), graphFallbackPolicy("primary Path", "fallback Path", "reason", true, true, "note"), graphSchedulerRule("Nova", "path Order", "fusion Rule", "cache Rule", "note"), "note"), graphGradientSpec("Nova", "loss Kind", "target Kind", 1, true, "note"), graphOptimizerState("key", "optimizer Kind", "learning Rate", "momentum", "weight Decay", 1, "note"), graphCheckpointPolicy("key", "png", "location", true, true, true, 1, "note"), graphReproducibilitySettings("key", 1, true, true, true, "backend Policy", "note"), "dataset Key", "note")
bool result = instance.CanResume()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_graph__graphtrainingplan"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"

[[dependencies]]
package = "compute.device"
version = "0.1.0"
path = "../../../yeho/packages/compute/device"

[[dependencies]]
package = "compute.graph"
version = "0.1.0"
path = "../../../yeho/packages/compute/graph"

[[dependencies]]
package = "compute.kernels"
version = "0.1.0"
path = "../../../yeho/packages/compute/kernels"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.graph--graphTrainingPlan/method-CanResume-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphTrainingPlan.CanReuseCache

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.graph

// Can reuse cache.
graphTrainingPlan instance = graphTrainingPlan("Nova", graphExecutionPlan("Nova", graphModel("Nova", "model Kind", [], [], "note"), graphCachePolicy("key", "scope", true, true, "note"), graphFallbackPolicy("primary Path", "fallback Path", "reason", true, true, "note"), graphSchedulerRule("Nova", "path Order", "fusion Rule", "cache Rule", "note"), "note"), graphGradientSpec("Nova", "loss Kind", "target Kind", 1, true, "note"), graphOptimizerState("key", "optimizer Kind", "learning Rate", "momentum", "weight Decay", 1, "note"), graphCheckpointPolicy("key", "png", "location", true, true, true, 1, "note"), graphReproducibilitySettings("key", 1, true, true, true, "backend Policy", "note"), "dataset Key", "note")
bool result = instance.CanReuseCache()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_graph__graphtrainingplan"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"

[[dependencies]]
package = "compute.device"
version = "0.1.0"
path = "../../../yeho/packages/compute/device"

[[dependencies]]
package = "compute.graph"
version = "0.1.0"
path = "../../../yeho/packages/compute/graph"

[[dependencies]]
package = "compute.kernels"
version = "0.1.0"
path = "../../../yeho/packages/compute/kernels"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.graph--graphTrainingPlan/method-CanReuseCache-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphTrainingPlan.HasFallback

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.graph

// Has fallback.
graphTrainingPlan instance = graphTrainingPlan("Nova", graphExecutionPlan("Nova", graphModel("Nova", "model Kind", [], [], "note"), graphCachePolicy("key", "scope", true, true, "note"), graphFallbackPolicy("primary Path", "fallback Path", "reason", true, true, "note"), graphSchedulerRule("Nova", "path Order", "fusion Rule", "cache Rule", "note"), "note"), graphGradientSpec("Nova", "loss Kind", "target Kind", 1, true, "note"), graphOptimizerState("key", "optimizer Kind", "learning Rate", "momentum", "weight Decay", 1, "note"), graphCheckpointPolicy("key", "png", "location", true, true, true, 1, "note"), graphReproducibilitySettings("key", 1, true, true, true, "backend Policy", "note"), "dataset Key", "note")
bool result = instance.HasFallback()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_graph__graphtrainingplan"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"

[[dependencies]]
package = "compute.device"
version = "0.1.0"
path = "../../../yeho/packages/compute/device"

[[dependencies]]
package = "compute.graph"
version = "0.1.0"
path = "../../../yeho/packages/compute/graph"

[[dependencies]]
package = "compute.kernels"
version = "0.1.0"
path = "../../../yeho/packages/compute/kernels"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.graph--graphTrainingPlan/method-HasFallback-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphTrainingPlan.CacheKey

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.graph

// Cache key.
graphTrainingPlan instance = graphTrainingPlan("Nova", graphExecutionPlan("Nova", graphModel("Nova", "model Kind", [], [], "note"), graphCachePolicy("key", "scope", true, true, "note"), graphFallbackPolicy("primary Path", "fallback Path", "reason", true, true, "note"), graphSchedulerRule("Nova", "path Order", "fusion Rule", "cache Rule", "note"), "note"), graphGradientSpec("Nova", "loss Kind", "target Kind", 1, true, "note"), graphOptimizerState("key", "optimizer Kind", "learning Rate", "momentum", "weight Decay", 1, "note"), graphCheckpointPolicy("key", "png", "location", true, true, true, 1, "note"), graphReproducibilitySettings("key", 1, true, true, true, "backend Policy", "note"), "dataset Key", "note")
text result = instance.CacheKey()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_graph__graphtrainingplan"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"

[[dependencies]]
package = "compute.device"
version = "0.1.0"
path = "../../../yeho/packages/compute/device"

[[dependencies]]
package = "compute.graph"
version = "0.1.0"
path = "../../../yeho/packages/compute/graph"

[[dependencies]]
package = "compute.kernels"
version = "0.1.0"
path = "../../../yeho/packages/compute/kernels"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.graph--graphTrainingPlan/method-CacheKey-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphTrainingPlan.ReproducibilityKey

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.graph

// Reproducibility key.
graphTrainingPlan instance = graphTrainingPlan("Nova", graphExecutionPlan("Nova", graphModel("Nova", "model Kind", [], [], "note"), graphCachePolicy("key", "scope", true, true, "note"), graphFallbackPolicy("primary Path", "fallback Path", "reason", true, true, "note"), graphSchedulerRule("Nova", "path Order", "fusion Rule", "cache Rule", "note"), "note"), graphGradientSpec("Nova", "loss Kind", "target Kind", 1, true, "note"), graphOptimizerState("key", "optimizer Kind", "learning Rate", "momentum", "weight Decay", 1, "note"), graphCheckpointPolicy("key", "png", "location", true, true, true, 1, "note"), graphReproducibilitySettings("key", 1, true, true, true, "backend Policy", "note"), "dataset Key", "note")
text result = instance.ReproducibilityKey()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_graph__graphtrainingplan"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"

[[dependencies]]
package = "compute.device"
version = "0.1.0"
path = "../../../yeho/packages/compute/device"

[[dependencies]]
package = "compute.graph"
version = "0.1.0"
path = "../../../yeho/packages/compute/graph"

[[dependencies]]
package = "compute.kernels"
version = "0.1.0"
path = "../../../yeho/packages/compute/kernels"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.graph--graphTrainingPlan/method-ReproducibilityKey-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## graphTrainingPlan.Describe

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.graph

// Describe.
graphTrainingPlan instance = graphTrainingPlan("Nova", graphExecutionPlan("Nova", graphModel("Nova", "model Kind", [], [], "note"), graphCachePolicy("key", "scope", true, true, "note"), graphFallbackPolicy("primary Path", "fallback Path", "reason", true, true, "note"), graphSchedulerRule("Nova", "path Order", "fusion Rule", "cache Rule", "note"), "note"), graphGradientSpec("Nova", "loss Kind", "target Kind", 1, true, "note"), graphOptimizerState("key", "optimizer Kind", "learning Rate", "momentum", "weight Decay", 1, "note"), graphCheckpointPolicy("key", "png", "location", true, true, true, 1, "note"), graphReproducibilitySettings("key", 1, true, true, true, "backend Policy", "note"), "dataset Key", "note")
text result = instance.Describe()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_graph__graphtrainingplan"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"

[[dependencies]]
package = "compute.device"
version = "0.1.0"
path = "../../../yeho/packages/compute/device"

[[dependencies]]
package = "compute.graph"
version = "0.1.0"
path = "../../../yeho/packages/compute/graph"

[[dependencies]]
package = "compute.kernels"
version = "0.1.0"
path = "../../../yeho/packages/compute/kernels"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.graph--graphTrainingPlan/method-Describe-14 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: yeho/packages/compute/graph/training.yh

AI training permission: https://demonhunterlabs.com/ai-use
