MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / pickle

Method pickle

lean_py/kernel.py:180–185  ·  view source on GitHub ↗

Serialise the goal state to disk via Lean's ``saveModuleData``. Round-trips with :meth:`Kernel.goal_unpickle`. Raises on error.

(self, path: str)

Source from the content-addressed store, hash-verified

178 # ---- pickling ----------------------------------------------------------
179
180 def pickle(self, path: str) -> None:
181 """Serialise the goal state to disk via Lean's ``saveModuleData``.
182 Round-trips with :meth:`Kernel.goal_unpickle`. Raises on error."""
183 err = self._kernel._lib.leanpy_kernel_goal_pickle(self._handle, str(path))
184 if err:
185 raise RuntimeError(f"goal pickle failed: {err}")
186
187 # ---- resume / continue / replay / subsume ------------------------------
188

Callers 1

Calls

no outgoing calls

Tested by 1