Filter#
filter module#
Filters that are used to create subgraphs.
- mmodel.filter.subnodes_by_inputs(graph, inputs: list) list[source]#
Obtain a list of subgraph nodes based on node inputs.
If a parent node is included, so are the child nodes.
- Returns:
list of node names
- mmodel.filter.subnodes_by_outputs(graph, outputs: list) list[source]#
Obtain a list of subgraph nodes based on node outputs.
For mmodel graphs, outputs from all internal nodes are unique. Therefore, the function only checks if function nodes overlap with the target return list. If a child node is included, so are the parent nodes.
- Returns:
list of node names