7ee5036b2858c2b18bf113d56059ae6d30656113,src/sdk/pynni/nni/_graph_utils.py,TorchModuleGraph,_build_graph,#TorchModuleGraph#,366

Before Change


            node_group = self._build_module_node_group(
                module_name, module_to_type[module_name], node_cpps, input_to_node, output_to_node
            )
            _logger.debug("node_group: %s", node_group)
            nodes_py.nodes_op.append(node_group)

        // each scope_name may have multiple funcs, we split them and create node for each of them
        // build node group for torch.nn.functional

After Change


            use_count = 0
            merged = set()
            for node in node_cpps:
                if node not in merged:
                    // modules that have same scope name may have different locations in the
                    // graph. Futhermore, there are also lots of prim:: nodes that in node_cpps,
                    // so we also need to call the expand_module_node.
                    unique_name = module_name
                    if use_count > 0:
                        unique_name = module_name + ".%d" % use_count
                    node_group = self._expand_module_node(
                        node, module_name, unique_name, module_to_type[module_name],
                        node_cpps, input_to_node, output_to_node, "module")
                    nodes_py.nodes_op.append(node_group)
                    use_count += 1
                    merged.update(node_group.node_cpps)

        // each scope_name may have multiple funcs, we split them and create node for each of them
        // build node group for torch.nn.functional
        for _, nodes in func_to_nodes.items():
            // extract non prim:: nodes
            non_prim_nodes = list()
            for node in nodes:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: Microsoft/nni
Commit Name: 7ee5036b2858c2b18bf113d56059ae6d30656113
Time: 2020-06-10
Author: 49771382+zheng-ningxin@users.noreply.github.com
File Name: src/sdk/pynni/nni/_graph_utils.py
Class Name: TorchModuleGraph
Method Name: _build_graph


Project Name: AlexsLemonade/refinebio
Commit Name: 59345529cf7663dc4e2b491c483ca47dd50567a4
Time: 2019-11-06
Author: arielsvn@gmail.com
File Name: foreman/data_refinery_foreman/foreman/management/commands/create_compendia.py
Class Name: Command
Method Name: handle


Project Name: catalyst-cooperative/pudl
Commit Name: fc44c71d4aa2e8a5ef60effd4bfe7fb82dffbf17
Time: 2021-01-06
Author: rousik@gmail.com
File Name: src/pudl/extract/excel.py
Class Name: GenericExtractor
Method Name: load_excel_file