CoreMorph

In the basic algorithm, the graph fragments that make up the grammar are defined by a rootnode, a radius and a thickness. A fragment is called a $CIP_{radius}^{thickness}(root)$. The core is made up of all the nodes in a certain radius around the root. Interface part is the subgraph induced by every node in distance radius+thickness arround the root minus nodes in the core.

Here, we generate a graph minor (by contracting edges) for any given input graph. We extract the CIP from the graph minor. Due to the contraction one node in the minor may represent any number of nodes in the unaltered graph. once we have the core in the unaltered graph, we can consider all nodes in THICKNES distance to this core and obtain a new interface.

Core and interface of the unaltered graph are saved in the grammar. There is still unused information in the interface of the minor graph. In the congruency check that will tell is if two CIPs are exchangeable, we not only check the unaltered graph interface but also the minor graphs interface. We hope that this will increase the score of the resulting applications of productions.

initialise nb


In [1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline

DEBUG=True
NJOBS=4
if DEBUG: NJOBS=1

from eden.util import configure_logging
import logging
configure_logging(logging.getLogger(),verbosity=1+DEBUG)

from IPython.core.display import HTML
HTML('<style>.container { width:95% !important; }</style><style>.output_png {display: table-cell;text-align: center;vertical-align: middle;}</style>')


Out[1]:

In [2]:
# data source, see introduction for info.
from eden.io.gspan import gspan_to_eden
from itertools import islice
def get_graphs(dataset_fname='../toolsdata/bursi.pos.gspan', size=100):
    return  list(islice(gspan_to_eden(dataset_fname),size))
import warnings
warnings.filterwarnings('ignore')

Meet the GraphTransformer (and the decomposer)

A graph transformer in general is used in two stages of the sampling process. First on an incoming graph to make it graphlearnable. Then, after a graph was changed, it might get retransformed. An example of this might be an RNA molecule that one wishes to refold after changing parts of the secondary structure graph.

The decomposer is the interface between graphs and graphlearn. It is conducting substitutions of CIPs and extract CIPs from the graph.

As long as the decomposer is delivering acceptable data, the sampler will not care what the graph looks like. It might not exist at all or have this second minorgraph version working in the background.

Data Defined Transformation

In this first example, the graphminor generation is learned. We do this by using the (one class) estimator to annotate the nodes in the graph, then the graph is contracted on nodes with similar scores. The subgraphs obtained in this way are then clustered and the clustername is used for the names of the parts.

User Defined GraphTransformer

Here we see another example of a way to generate a graph minor.

Since we are working on molecules, cyclic structures are of interest. Therefore it makes sense to introduce an abstraction based on these cycles.

In this case the graph minor generation is not learned but boringly generated.

notice how each cycle is contracted to one node in the minor graph.

In [3]:
from graphlearn.utils import draw
import graphlearn.minor.molecule.transform_cycle as mole
import graphlearn.minor.decompose as decompose
from graphlearn.graphlearn import Sampler as GLS
from eden.graph import Vectorizer

'''
decomposer = decompose.MinorDecomposer(include_base=False, base_thickness_list=[2])

#the preprocessor makes the abstraction, wrapper provides convenient format for drawing
preproc=mole.GraphTransformerCircles()
# get a graph and prepare it
graphs=get_graphs()
g=graphs.next()
graph_wrapper=decomposer.make_new_decomposer(preproc.wrap(g))
graph=graph_wrapper.pre_vectorizer_graph(nested=True)

# draw 
draw.graphlearn(graph,size=10, abstract_color='red', contract=True,ignore_for_layout='nesting')
'''


Out[3]:
"\ndecomposer = decompose.MinorDecomposer(include_base=False, base_thickness_list=[2])\n\n#the preprocessor makes the abstraction, wrapper provides convenient format for drawing\npreproc=mole.GraphTransformerCircles()\n# get a graph and prepare it\ngraphs=get_graphs()\ng=graphs.next()\ngraph_wrapper=decomposer.make_new_decomposer(preproc.wrap(g))\ngraph=graph_wrapper.pre_vectorizer_graph(nested=True)\n\n# draw \ndraw.graphlearn(graph,size=10, abstract_color='red', contract=True,ignore_for_layout='nesting')\n"

Generating a Sampler that uses GraphMinors

There are no modifications made to the sampler. Just new decomposer and graphtransformer parameters are given.


In [9]:
from graphlearn.graphlearn import Sampler as graphlearn_sampler
from graphlearn.learnedlayer import transform
graphs = get_graphs(size=200)
import graphlearn.minor.decompose as decompose

sampler=graphlearn_sampler(
            decomposer=decompose.MinorDecomposer(),
            graphtransformer=transform.GraphMinorTransformer(group_score_threshold=0.4,num_classes=1,debug=False),
            n_samples=5,
     
            batch_size=1,
            n_steps=50,
            n_jobs=1,
            quick_skip_orig_cip=False,
            core_choice_byfrequency=True,
            burnin=0,
            improving_threshold_fraction=0.5,
            select_cip_max_tries=100,
            keep_duplicates=True,
            monitor=True,
            include_seed=True)

sampler.fit(graphs)
print 'done'


accept_min_similarity: 0.0
accept_static_penalty: 0.0
batch_size: 1
    burnin: 0
core_choice_bytrial: False
core_choice_bytrial_multiplier: 1.0
decomposer: no graphs in decomposer
estimatorobject: <graphlearn.estimate.OneClassEstimator instance at 0x7f06aa3275a8>
feasibility_checker: <graphlearn.feasibility.FeasibilityChecker instance at 0x7f06aa3275f0>
graph_transformer: <graphlearn.learnedlayer.transform.GraphMinorTransformer object at 0x7f06a84741d0>
improving_linear_start_absolute: 0
improving_linear_start_fraction: 0
improving_penalty_per_step: 0.04
improving_threshold_absolute: 25
improving_threshold_fraction: 0.5
include_seed: True
keep_duplicates: True
      lsgg: <graphlearn.localsubstitutablegraphgrammar.LocalSubstitutableGraphGrammar object at 0x7f06aa32d690>
maxbacktrack: 0
   monitor: True
  monitors: []
    n_jobs: 1
 n_samples: 5
   n_steps: 50
orig_cip_max_positives: 1
orig_cip_min_positives: 0
orig_cip_score_tricks: False
probabilistic_core_choice: True
proposal_probability: False
quick_skip_orig_cip: False
random_state: None
sampling_interval: 10
score_core_choice: False
select_cip_max_tries: 100
similarity: -1
size_constrained_core_choice: -1
size_diff_core_filter: -1
vectorizer:               __version__: 1.0.1                   bitmask: 65535                block_size: 100                complexity: 3                         d: 3                  discrete: True              feature_size: 65537       inner_normalization: True                 key_class: class            key_importance: importance                 key_label: label               key_nesting: nesting                  key_svec: svec                   key_vec: vec                key_weight: weight                     min_d: 0                     min_r: 0                    n_jobs: 1                      name: Vectorizer                     nbits: 16             normalization: True                positional: False                         r: 3              weights_dict: None
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Process PoolWorker-892:
Process PoolWorker-891:
Traceback (most recent call last):
Process PoolWorker-890:
Traceback (most recent call last):
Process PoolWorker-889:
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 113, in worker
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 113, in worker
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 113, in worker
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 113, in worker
    result = (True, func(*args, **kwds))
    result = (True, func(*args, **kwds))
    result = (True, func(*args, **kwds))
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 372, in extract_cips
    result = (True, func(*args, **kwds))
    return [f([y] + args) for y in graph_batch]
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 372, in extract_cips
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 372, in extract_cips
    return [f([y] + args) for y in graph_batch]
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 372, in extract_cips
    return [f([y] + args) for y in graph_batch]
    return [f([y] + args) for y in graph_batch]
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
    thickness_list=thickness_list)
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    thickness_list=thickness_list)
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    node_filter=self.node_entity_check)
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 651, in merge_core
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 651, in merge_core
    draw.graphlearn(abstract_graph, vertex_label='contracted', size=10)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 651, in merge_core
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/utils/draw.py", line 449, in graphlearn
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
    draw.graphlearn(abstract_graph, vertex_label='contracted', size=10)
    **args)
    draw.graphlearn(abstract_graph, vertex_label='contracted', size=10)
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 303, in draw_graph_set
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 651, in merge_core
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/utils/draw.py", line 449, in graphlearn
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/utils/draw.py", line 449, in graphlearn
    **args)
    draw.graphlearn(abstract_graph, vertex_label='contracted', size=10)
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 303, in draw_graph_set
    size=size, **args)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/utils/draw.py", line 449, in graphlearn
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 323, in draw_graph_row
    **args)
    size=size, **args)
    **args)
    plt.subplot(1, n_graphs_per_line, i + 1)
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 320, in draw_graph_row
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 303, in draw_graph_set
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 303, in draw_graph_set
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 1022, in subplot
    size=size, **args)
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 328, in draw_graph_row
    plt.xlim(xmax=3)
    size=size, **args)
    a = fig.add_subplot(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1005, in add_subplot
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 1574, in xlim
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 330, in draw_graph_row
    a = subplot_class_factory(projection_class)(self, *args, **kwargs)
    ax = gca()
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_subplots.py", line 73, in __init__
    plt.show()
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 928, in gca
    self._axes_class.__init__(self, fig, self.figbox, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 244, in show
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 508, in __init__
    return gcf().gca(**kwargs)
    **args)
    self._init_axis()
  File "/home/ikea/EDEN/EDeN/eden/display/__init__.py", line 171, in draw_graph
    args="-Gmode=KK")
    return _show(*args, **kw)
  File "/home/ikea/.local/lib/python2.7/site-packages/networkx/drawing/nx_agraph.py", line 229, in graphviz_layout
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1359, in gca
    return pygraphviz_layout(G,prog=prog,root=root,args=args)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 566, in _init_axis
  File "/home/ikea/.local/lib/python2.7/site-packages/ipykernel/pylab/backend_inline.py", line 36, in show
  File "/home/ikea/.local/lib/python2.7/site-packages/networkx/drawing/nx_agraph.py", line 264, in pygraphviz_layout
    A.layout(prog=prog,args=args)
    self.xaxis = maxis.XAxis(self)
    return self.add_subplot(1, 1, 1, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 658, in __init__
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1005, in add_subplot
    a = subplot_class_factory(projection_class)(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_subplots.py", line 73, in __init__
    display(figure_manager.canvas.figure)
  File "/home/ikea/.local/lib/python2.7/site-packages/IPython/core/display.py", line 164, in display
    self._axes_class.__init__(self, fig, self.figbox, **kwargs)
    self.cla()
    format_dict, md_dict = format(obj, include=include, exclude=exclude)
  File "/home/ikea/.local/lib/python2.7/site-packages/pygraphviz/agraph.py", line 1358, in layout
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 508, in __init__
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 742, in cla
  File "/home/ikea/.local/lib/python2.7/site-packages/IPython/core/formatters.py", line 145, in format
    self.reset_ticks()
    data = formatter(obj)
  File "<decorator-gen-9>", line 2, in __call__
    self._init_axis()
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 756, in reset_ticks
  File "/home/ikea/.local/lib/python2.7/site-packages/IPython/core/formatters.py", line 190, in catch_format_error
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 568, in _init_axis
    r = method(self, *args, **kwargs)
    self.spines['top'].register_axis(self.xaxis)
  File "/home/ikea/.local/lib/python2.7/site-packages/IPython/core/formatters.py", line 307, in __call__
  File "/usr/lib/python2.7/dist-packages/matplotlib/spines.py", line 163, in register_axis
    return printer(obj)
    self.majorTicks.extend([self._get_tick(major=True)])
    data = self._run_prog(prog, ' '.join([args, "-T", fmt]))
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 1675, in _get_tick
    self.axis.cla()
  File "/home/ikea/.local/lib/python2.7/site-packages/IPython/core/pylabtools.py", line 240, in <lambda>
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 742, in cla
    return XTick(self.axes, 0, '', major=major, **tick_kw)
    self.reset_ticks()
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 151, in __init__
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 757, in reset_ticks
  File "/home/ikea/.local/lib/python2.7/site-packages/pygraphviz/agraph.py", line 1316, in _run_prog
    self.tick2line = self._get_tick2line()
    self.minorTicks.extend([self._get_tick(major=False)])
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 414, in _get_tick2line
    png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 1675, in _get_tick
    close_fds=False)
    zorder=self._zorder)
  File "/home/ikea/.local/lib/python2.7/site-packages/IPython/core/pylabtools.py", line 124, in print_figure
    return XTick(self.axes, 0, '', major=major, **tick_kw)
    fig.canvas.print_figure(bytes_io, **kw)
  File "/usr/lib/python2.7/dist-packages/matplotlib/lines.py", line 338, in __init__
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 152, in __init__
  File "/usr/lib/python2.7/dist-packages/matplotlib/backend_bases.py", line 2180, in print_figure
    errread, errwrite)
    self._marker = MarkerStyle()
    **kwargs)
    self.gridline = self._get_gridline()
  File "/usr/lib/python2.7/dist-packages/matplotlib/markers.py", line 148, in __init__
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 527, in print_png
  File "/usr/lib/python2.7/subprocess.py", line 1235, in _execute_child
    def __init__(self, marker=None, fillstyle=None):
    FigureCanvasAgg.draw(self)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axis.py", line 428, in _get_gridline
KeyboardInterrupt
    self.pid = os.fork()
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 474, in draw
    markersize=0)
  File "/usr/lib/python2.7/dist-packages/matplotlib/lines.py", line 370, in __init__
KeyboardInterrupt
    self.figure.draw(self.renderer)
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    if is_numlike(self._picker):
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1159, in draw
    func(*args)
  File "/usr/lib/python2.7/dist-packages/matplotlib/cbook.py", line 757, in is_numlike
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line 2324, in draw
    obj + 1
    a.draw(renderer)
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
KeyboardInterrupt
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/collections.py", line 815, in draw
    Collection.draw(self, renderer)
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/collections.py", line 324, in draw
    self._offset_position)
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 126, in draw_path_collection
    return self._renderer.draw_path_collection(*kl, **kw)
  File "/usr/lib/python2.7/dist-packages/matplotlib/path.py", line 221, in vertices
    @property
KeyboardInterrupt
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.py", line 383, in extract_cores_and_interfaces
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 338, in all_core_interface_pairs
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 652, in merge_core
    exit()
NameError: global name 'exit' is not defined

---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-9-e5b3c77529af> in <module>()
     21             include_seed=True)
     22 
---> 23 sampler.fit(graphs)
     24 print 'done'

/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.pyc in fit(self, graphs)
    423         decomposers = [self.decomposer.make_new_decomposer(data)
    424                        for data in self.graph_transformer.fit_transform(graphs)]
--> 425         self.fit_grammar(decomposers)
    426         self.fit_estimator(decomposers)
    427 

/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.pyc in fit_grammar(self, decomposers, n_jobs, batch_size)
    392 
    393     def fit_grammar(self, decomposers, n_jobs=-1, batch_size=10):
--> 394         self.lsgg.fit(decomposers, n_jobs=n_jobs, batch_size=batch_size)
    395         # self._init_grammar_prep() cant do it here cuz esti might not be ready
    396 

/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.pyc in fit(self, graphmanagerlist, n_jobs, batch_size, reinit_productions)
    124         self.dataset_size = len(graphmanagerlist)
    125 
--> 126         self._read(graphmanagerlist, n_jobs, batch_size=batch_size)
    127         self.clean()
    128         dataset_size, interface_counts, core_counts, cip_counts = self.size()

/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.pyc in _read(self, graphs, n_jobs, batch_size)
    265             self._read_single(graphs)
    266         else:
--> 267             self._read_multi(graphs, n_jobs, batch_size)
    268         self.prep_is_outdated = True
    269 

/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/localsubstitutablegraphgrammar.pyc in _read_multi(self, graphs, n_jobs, batch_size)
    314         # the resulting chips can now be put intro the grammar
    315         jobs_done = 0
--> 316         for batch in results:
    317             for exci in batch:
    318                 if exci:  # exci might be None because the grouper fills up with empty problems

/usr/lib/python2.7/multiprocessing/pool.pyc in next(self, timeout)
    653                 if self._index == self._length:
    654                     raise StopIteration
--> 655                 self._cond.wait(timeout)
    656                 try:
    657                     item = self._items.popleft()

/usr/lib/python2.7/threading.pyc in wait(self, timeout)
    338         try:    # restore state no matter what (e.g., KeyboardInterrupt)
    339             if timeout is None:
--> 340                 waiter.acquire()
    341                 if __debug__:
    342                     self._note("%s.wait(): got it", self)

KeyboardInterrupt: 

Inspect the induced grammar

The first graph in each line shows the minor graph of the first CIP. note that the minor-interfacegraph is the same for all CIPs, while the minor-core might be different.


In [5]:
if True:
    draw.draw_grammar(sampler.lsgg.productions,n_productions=3,n_graphs_per_production=5,
                         n_graphs_per_line=5, size=9, contract=False,
                         colormap='Paired', invert_colormap=False,
                         vertex_alpha=0.6, edge_alpha=0.5,  abstract_interface=True)


interface id: 401440 [4 options]
interface id: 881050 [2 options]
interface id: 502048 [2 options]

sample molecules

Sampling works exactly the same way as before.


In [6]:
import itertools

#parameters
graphs = get_graphs()
id_start=15
id_end=id_start+9
graphs = itertools.islice(graphs,id_start,id_end)
n_steps=50


# sampling with many arguments.
graphs = sampler.transform(graphs)

In [7]:
from  graphlearn.utils import draw
    
scores=[]
ids=range(id_start,id_end)
for i,path_graphs in enumerate(graphs):
    # for each sampling path:
    print 'Graph id: %d'%(ids[i])
    
    #collect scores so that we can display the score graph later 
    scores.append( sampler.monitors[i].sampling_info['score_history'] )
    
    # show graphs
    draw.graphlearn(path_graphs,
                        n_graphs_per_line=5, size=10, 
                       colormap='Paired', invert_colormap=False, vertex_color='_label_',
                        vertex_alpha=0.5, edge_alpha=0.7)


preprocessing grammar
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 15
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 16
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 17
_propose_graph: iteration 0 ; core 0 of 3 ; original_cips tried  0 ; size 35
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 1 out of 50 n_steps
Graph id: 18
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 19
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 20
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 21
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 22
'contracted'
Traceback (most recent call last):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 588, in transform_single
    candidate_graph_decomposer = self._propose(graph_decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 831, in _propose
    proposed_decomposer = self._propose_graph(decomposer)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/graphlearn.py", line 857, in _propose_graph
    for orig_cip_ctr, original_cip in enumerate(select_original_cip(decomposer, self)):
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 25, in select_original_cip
    cip = _get_original_cip(decomposer,grammar=sampler.lsgg)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/cip_select.py", line 57, in _get_original_cip
    return decomposer.random_core_interface_pair(radius_list=grammar.radius_list, thickness_list=grammar.thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 385, in random_core_interface_pair
    thickness_list=thickness_list)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 304, in rooted_core_interface_pairs
    node_filter=self.node_entity_check)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 560, in extract_cips
    base_copy, mergeids = merge_core(base_graph.copy(), abstract_graph, abstract_cip)
  File "/home/ikea/GRAPHLEARN/GraphLearn/graphlearn/minor/decompose.py", line 648, in merge_core
    for base_graph_id in abstract_graph.node[abstract_node_id]['contracted']]
KeyError: 'contracted'

_sample stopped at 0 out of 50 n_steps
Graph id: 23

plot score graph


In [8]:
%matplotlib inline
from itertools import islice
import numpy as np
import matplotlib.pyplot as plt

step=1
num_graphs_per_plot=3
num_plots=np.ceil([len(scores)/num_graphs_per_plot])
for i in range(num_plots):
    plt.figure(figsize=(10,5))
    for j,score in enumerate(scores[i*num_graphs_per_plot:i*num_graphs_per_plot+num_graphs_per_plot]):
        data = list(islice(score,None, None, step))
        plt.plot(data, label='graph %d'%(j+i*num_graphs_per_plot+id_start))
    plt.legend(loc='lower right')
    plt.grid()
    plt.ylim(-0.1,1.1)
    plt.show()




In [ ]:


In [ ]:


In [ ]: