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

Method to_dict

verifier/AgentVerifier/WorkflowToLean.py:209–219  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

207 submodule_map: Optional[dict[str, SubmoduleRef]] = None
208
209 def to_dict(self) -> dict:
210 d: dict = {
211 "name": self.name, "goal": self.goal,
212 "parameters": [p.to_dict() for p in self.parameters],
213 "nodes": [n.to_dict() for n in self.nodes],
214 "edges": [e.to_dict() for e in self.edges],
215 "entry": self.entry, "exits": self.exits,
216 }
217 if self.submodule_map:
218 d["submodule_map"] = {k: v.to_dict() for k, v in self.submodule_map.items()}
219 return d
220
221 @staticmethod
222 def from_dict(d: dict) -> "WorkflowIR":

Callers 1

save_jsonMethod · 0.95

Calls 1

to_dictMethod · 0.45

Tested by

no test coverage detected