Local variable 'node_feature_flag' is assigned to but never used:
88 node_feature_flag = FalseLocal variable 'deg_list' is assigned to but never used:
111 deg_list = list(dict(g.g.degree(range(len(g.g)))).values())Line too long (119 > 79 characters):
21 node_features: a torch float tensor, one-hot representation of the tag that is used as input to neural netsLine too long (104 > 79 characters):
22 edge_mat: a torch long tensor, contain edge list, will be used to create torch sparse tensorLine too long (100 > 79 characters):
70 row, attr = [int(w) for w in row[:tmp]], np.array([float(w) for w in row[tmp:]])Line too long (93 > 79 characters):
128 g.node_features[range(len(g.node_tags)), [tag2index[tag] for tag in g.node_tags]] = 1Line too long (81 > 79 characters):
139 def load_zinc_data(path, name, degree_as_tag, num_atom_type=28, num_bond_type=4):Line too long (148 > 79 characters):
141 ### splits and preprocessing according to https://github.com/graphdeeplearning/benchmarking-gnns/blob/master/main_molecules_graph_regression.pyLine too long (88 > 79 characters):
144 Graph = namedtuple('Graph', ['node_features', 'edge_mat', 'edge_features', 'label'])Line too long (83 > 79 characters):
156 graph = Graph(node_features, edge_list.permute(1, 0), edge_features, label)Line too long (92 > 79 characters):
162 with open(os.path.join(path,'molecules','{}.pickle'.format(split_name)), "rb") as f:Line too long (90 > 79 characters):
166 with open(os.path.join(path, 'indices', '{}.index'.format(split_name)), "r") as f:Line too long (83 > 79 characters):
179 ### splits and preprocessing according to https://github.com/snap-stanford/ogbLine too long (84 > 79 characters):
188 dataset = PygGraphPropPredDataset(name=name, root=path, transform=transform)Line too long (88 > 79 characters):
191 Graph = namedtuple('Graph', ['node_features', 'edge_mat', 'edge_features', 'label'])Line too long (82 > 79 characters):
196 num_classes = dataset.num_classes if name == 'ogbg-ppa' else dataset.num_tasksLine too long (106 > 79 characters):
202 ### code used to load SR graphs obtained from here http://users.cecs.anu.edu.au/~bdm/data/graphs.htmlLine too long (130 > 79 characters):
203 ### we don't split the data, because no training is performed (the network is used with random weights for the SR experiment)Line too long (84 > 79 characters):
210 edge_index = to_undirected(torch.tensor(list(datum.edges())).transpose(1,0))Line too long (143 > 79 characters):
246 assert -1 <= fold_idx and fold_idx < 10, "Parameter fold_idx must be from -1 to 9, with -1 referring to the special model selection split."Line too long (92 > 79 characters):
248 train_filename = os.path.join(path, '10fold_idx', 'train_idx-{}.txt'.format(fold_idx+1))Line too long (90 > 79 characters):
249 test_filename = os.path.join(path, '10fold_idx', 'test_idx-{}.txt'.format(fold_idx+1))Line too long (88 > 79 characters):
250 val_filename = os.path.join(path, '10fold_idx', 'val_idx-{}.txt'.format(fold_idx+1))Missing whitespace after ',':
112 g.edge_mat = torch.LongTensor(edges).transpose(0,1)Missing whitespace after ':':
124 tag2index = {tagset[i]:i for i in range(len(tagset))}Missing whitespace after ',' (in 2 places):
162 with open(os.path.join(path,'molecules','{}.pickle'.format(split_name)), "rb") as f:Missing whitespace after ',':
206 Graph = namedtuple('Graph', ['node_features', 'edge_mat','label'])Missing whitespace after ',':
208 for i,datum in enumerate(dataset):Missing whitespace after ',':
209 x = torch.ones(datum.number_of_nodes(),1)Missing whitespace after ',':
210 edge_index = to_undirected(torch.tensor(list(datum.edges())).transpose(1,0))Unexpected spaces around keyword / parameter equals (in 4 places):
223 skf = StratifiedKFold(n_splits=10, shuffle = True, random_state = seed)