MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / from_dict

Method from_dict

verifier/AgentVerifier/WorkflowToLean.py:222–231  ·  view source on GitHub ↗
(d: dict)

Source from the content-addressed store, hash-verified

220
221 @staticmethod
222 def from_dict(d: dict) -> "WorkflowIR":
223 return WorkflowIR(
224 name=d["name"], goal=d["goal"],
225 parameters=[TypedVar.from_dict(p) for p in d["parameters"]],
226 nodes=[NodeIR.from_dict(n) for n in d["nodes"]],
227 edges=[EdgeIR.from_dict(e) for e in d["edges"]],
228 entry=d["entry"], exits=d["exits"],
229 submodule_map={k: SubmoduleRef.from_dict(v) for k, v in d["submodule_map"].items()}
230 if d.get("submodule_map") else None,
231 )
232
233 def save_json(self, path: str, indent: int = 2) -> None:
234 with open(path, "w", encoding="utf-8") as f:

Callers

nothing calls this directly

Calls 3

WorkflowIRClass · 0.85
getMethod · 0.80
from_dictMethod · 0.45

Tested by

no test coverage detected