ml_switcheroo.compiler.frontends.python¶

Python Frontend.

Wraps the LibCST parser and GraphExtractor to provide a standard interface for ingesting Python code into the Logical Graph IR.

Classes¶

PythonFrontend

Ingests Python source code into a LogicalGraph.

Module Contents¶

class ml_switcheroo.compiler.frontends.python.PythonFrontend(code: str)[source]¶

Ingests Python source code into a LogicalGraph.

code¶
parse_to_graph() → ml_switcheroo.compiler.ir.LogicalGraph[source]¶

Parses the code and extracts the computation graph.