'.utils_graph_processing.automorphism_orbits' imported but unused:
2 from .utils_graph_processing import subgraph_isomorphism_edge_counts, subgraph_isomorphism_vertex_counts, \'.utils_graph_processing.edge_automorphism_orbits' imported but unused:
2 from .utils_graph_processing import subgraph_isomorphism_edge_counts, subgraph_isomorphism_vertex_counts, \'.utils_graph_processing.induced_edge_automorphism_orbits' imported but unused:
2 from .utils_graph_processing import subgraph_isomorphism_edge_counts, subgraph_isomorphism_vertex_counts, \'.utils_graph_processing.subgraph_isomorphism_edge_counts' imported but unused:
2 from .utils_graph_processing import subgraph_isomorphism_edge_counts, subgraph_isomorphism_vertex_counts, \'.utils_graph_processing.subgraph_isomorphism_vertex_counts' imported but unused:
2 from .utils_graph_processing import subgraph_isomorphism_edge_counts, subgraph_isomorphism_vertex_counts, \'.utils_ids.subgraph_counts2ids' imported but unused:
4 from .utils_ids import subgraph_counts2ids'.utils_graph_learning.multi_class_accuracy' imported but unused:
6 from .utils_graph_learning import multi_class_accuracy'torch.nn' imported but unused:
8 import torch.nn as nn'numpy as np' imported but unused:
9 import numpy as npLine too long (107 > 79 characters):
2 from .utils_graph_processing import subgraph_isomorphism_edge_counts, subgraph_isomorphism_vertex_counts, \Line too long (83 > 79 characters):
3 induced_edge_automorphism_orbits, edge_automorphism_orbits, automorphism_orbitsLine too long (106 > 79 characters):
24 raise ValueError('You must specify either a type or a filename where to read substructures from.')Line too long (87 > 79 characters):
30 graphs_nx = nx.read_graph6(os.path.join(filename, 'graph{}c.g6'.format(k)))Line too long (85 > 79 characters):
31 if isinstance(graphs_nx, list) or isinstance(graphs_nx, types.GeneratorType):Line too long (88 > 79 characters):
51 if dataset in ['bioinformatics', 'social', 'chemical', 'ogb', 'SR_graphs', 'MNIST']:Line too long (112 > 79 characters):
58 data_file = os.path.join(data_folder, '{}_induced_directed_orbits_{}.pt'.format(id_type, k))Line too long (96 > 79 characters):
60 data_file = os.path.join(data_folder, '{}_induced_{}.pt'.format(id_type, k))Line too long (104 > 79 characters):
63 data_file = os.path.join(data_folder, '{}_directed_orbits_{}.pt'.format(id_type, k))Line too long (88 > 79 characters):
65 data_file = os.path.join(data_folder, '{}_{}.pt'.format(id_type, k))Line too long (98 > 79 characters):
72 raise NotImplementedError("Dataset family {} is not currently supported.".format(dataset))Line too long (84 > 79 characters):
78 graphs_ptg, num_classes, orbit_partition_sizes = load_dataset(data_file)Line too long (115 > 79 characters):
81 else: # try downgrading. Currently works only when for each k there is only one substructure in the familyLine too long (103 > 79 characters):
88 succeded, graphs_ptg, num_classes, orbit_partition_sizes = try_downgrading(data_folder,Line too long (99 > 79 characters):
89 id_type,Line too long (118 > 79 characters):
90 subgraph_params['induced'],Line too long (107 > 79 characters):
91 subgraph_params[Line too long (113 > 79 characters):
92 'directed_orbits']Line too long (115 > 79 characters):
93 and id_scope == 'local',Line too long (100 > 79 characters):
94 k, k_min)Line too long (91 > 79 characters):
97 torch.save((graphs_ptg, num_classes, orbit_partition_sizes), data_file)Line too long (109 > 79 characters):
102 graphs_ptg, num_classes, num_node_type, num_edge_type, orbit_partition_sizes = generate_dataset(path,Line too long (109 > 79 characters):
103 name,Line too long (106 > 79 characters):
104 k,Line too long (119 > 79 characters):
105 extract_ids_fn,Line too long (113 > 79 characters):
106 count_fn,Line too long (120 > 79 characters):
107 automorphism_fn,Line too long (112 > 79 characters):
108 id_type,Line too long (120 > 79 characters):
109 multiprocessing,Line too long (118 > 79 characters):
110 num_processes,Line too long (122 > 79 characters):
111 **subgraph_params)Line too long (83 > 79 characters):
114 torch.save((graphs_ptg, num_classes, orbit_partition_sizes), data_file)Line too long (111 > 79 characters):
117 torch.save((num_node_type, num_edge_type), os.path.join(path, 'processed', 'num_feature_types.pt'))Line too long (90 > 79 characters):
137 Extracts the substructures of size up to the `k`, if a collection of substructuresLine too long (102 > 79 characters):
140 found_data_filename, k_found = find_id_filename(data_folder, id_type, induced, directed_orbits, k)Line too long (90 > 79 characters):
142 graphs_ptg, num_classes, orbit_partition_sizes = load_dataset(found_data_filename)Line too long (100 > 79 characters):
144 graphs_ptg, orbit_partition_sizes = downgrade_k(graphs_ptg, k, orbit_partition_sizes, k_min)Line too long (93 > 79 characters):
152 Looks for existing precomputed datasets in `data_folder` with counts for substructureLine too long (103 > 79 characters):
157 pattern = os.path.join(data_folder, '{}_induced_directed_orbits_[0-9]*.pt'.format(id_type))Line too long (87 > 79 characters):
159 pattern = os.path.join(data_folder, '{}_induced_[0-9]*.pt'.format(id_type))Line too long (95 > 79 characters):
162 pattern = os.path.join(data_folder, '{}_directed_orbits_[0-9]*.pt'.format(id_type))Line too long (87 > 79 characters):
174 Donwgrades `dataset` by keeping only the orbits of the requested substructures.Line too long (84 > 79 characters):
183 setattr(new_data, 'identifiers', data.identifiers[:, 0:feature_vector_size])