{"id":"compute.graph--CreateGraphCheckpointPolicy","name":"CreateGraphCheckpointPolicy","owner":"yeho","package":"compute.graph","kind":"function","signature":"external CreateGraphCheckpointPolicy(text key, text format, text location, bool includeModelState, bool includeOptimizerState, bool includeRngState, int keepLatestCount, text note) returns graphCheckpointPolicy","description":"Create graph checkpoint policy from the supplied values.","context":"Describe compute work as an explicit graph with package-owned validation and scheduling metadata.","parameters":[{"name":"key","type":"text","description":"Supply key as text."},{"name":"format","type":"text","description":"Supply format as text."},{"name":"location","type":"text","description":"Supply location as text."},{"name":"includeModelState","type":"bool","description":"Supply include model state as bool."},{"name":"includeOptimizerState","type":"bool","description":"Supply include optimizer state as bool."},{"name":"includeRngState","type":"bool","description":"Supply include rng state as bool."},{"name":"keepLatestCount","type":"int","description":"Supply keep latest count as int."},{"name":"note","type":"text","description":"Supply note as text."}],"returns":"graphCheckpointPolicy","members":[],"tags":["compute","compute.graph","cpu","function","graph","source-example","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/compute/graph/training.yh","line":293,"sha256":"df3f352a0daeea888785284ad41be26df4c606c7ffe50b68ed7188f4fcee4410"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use CreateGraphCheckpointPolicy","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using compute.graph\n\n// Describe compute work as an explicit graph with package-owned validation and scheduling metadata.\ntext key = \"key\"\ntext format = \"png\"\ntext location = \"location\"\nbool includeModelState = true\nbool includeOptimizerState = true\nbool includeRngState = true\nint keepLatestCount = 1\ntext note = \"note\"\ngraphCheckpointPolicy result = CreateGraphCheckpointPolicy(key, format, location, includeModelState, includeOptimizerState, includeRngState, keepLatestCount, note)\nConsole.Log(\"Inspect result in your debugger\")\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_graph__creategraphcheckpointpolicy\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.buffer\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/buffer\"\n\n[[dependencies]]\npackage = \"compute.device\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/device\"\n\n[[dependencies]]\npackage = \"compute.graph\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/graph\"\n\n[[dependencies]]\npackage = \"compute.kernels\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/kernels\"\n\n[[dependencies]]\npackage = \"compute.tensor\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/tensor\"\n\n[[dependencies]]\npackage = \"console\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/console\"\n\n[[dependencies]]\npackage = \"diagnostics\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/diagnostics\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"0894f709f271e4cf04a9ccd5c39f1e25cd33f865a0d8d48f856cdfde9ffbb926","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=compute.graph--CreateGraphCheckpointPolicy","json":"https://demonhunterlabs.com/reference/items/compute.graph--CreateGraphCheckpointPolicy.json","markdown":"https://demonhunterlabs.com/reference/text/compute.graph--CreateGraphCheckpointPolicy.md"}
