Line too long (102 > 79 characters):
18 This dataset is directly adopted from Open Graph Benchmark, and originally curated by MoleculeNet.Line too long (93 > 79 characters):
31 Each molecule is annotated with the scaffold ID that the molecule is assigned to.Line too long (82 > 79 characters):
38 title={Open Graph Benchmark: Datasets for Machine Learning on Graphs},Line too long (112 > 79 characters):
39 author={W. {Hu}, M. {Fey}, M. {Zitnik}, Y. {Dong}, H. {Ren}, B. {Liu}, M. {Catasta}, J. {Leskovec}},Line too long (129 > 79 characters):
46 author={Z. {Wu}, B. {Ramsundar}, E. V {Feinberg}, J. {Gomes}, C. {Geniesse}, A. S {Pappu}, K. {Leswing}, V. {Pande}},Line too long (114 > 79 characters):
66 def __init__(self, version=None, root_dir='data', download=False, split_scheme='official', random_split=False,Line too long (119 > 79 characters):
70 raise ValueError('Versioning for OGB-MolPCBA is handled through the OGB package. Please set version=none.')Line too long (86 > 79 characters):
72 self.ogb_dataset = PygGraphPropPredDataset(name='ogbg-molpcba', root=root_dir)Line too long (138 > 79 characters):
79 self._y_type = 'float' # although the task is binary classification, the prediction target contains nan value, thus we need floatLine too long (115 > 79 characters):
92 val_split_idx = random_index[len(split_idx['train']):len(split_idx['train']) + len(split_idx['valid'])]Line too long (93 > 79 characters):
93 test_split_idx = random_index[len(split_idx['train']) + len(split_idx['valid']):]Line too long (96 > 79 characters):
107 metadata_file_path = os.path.join(self.ogb_dataset.root, 'raw', 'OGB-MolPCBA_group.npy')Line too long (113 > 79 characters):
110 'https://www.dropbox.com/s/jjpr6tw34llxbpw/OGB-MolPCBA_group.zip?dl=1', self.ogb_dataset.raw_dir)Line too long (98 > 79 characters):
113 self._metadata_array = torch.from_numpy(np.load(metadata_file_path)).reshape(-1, 1).long()Line too long (111 > 79 characters):
132 subgraph = GSN(dataset_name='ogbg-molhiv', dataset_group='ogb', induced=True, id_type=self.id_type,Line too long (116 > 79 characters):
134 self.graphs_ptg, self.encoder_ids, self.d_id, self.d_degree = subgraph.preprocess(self.ogb_dataset.root)Line too long (86 > 79 characters):
145 self.num_edge_features = self.graphs_ptg[0].edge_features.shape[1]Line too long (91 > 79 characters):
167 - prediction_fn (function): A function that turns y_pred into predicted labels.Line too long (106 > 79 characters):
168 Only None is supported because OGB Evaluators accept binary logitsLine too long (121 > 79 characters):
173 assert prediction_fn is None, "OGBPCBADataset.eval() does not support prediction_fn. Only binary logits accepted"Line too long (89 > 79 characters):
183 deg_inv = torch.where(deg > 0, 1. / torch.sqrt(deg), torch.zeros(deg.size()))Line too long (109 > 79 characters):
197 adj = _sym_normalize_adj(to_dense_adj(graph.edge_index, max_num_nodes=graph.x.size(0)).squeeze())Line too long (103 > 79 characters):
212 adj_feat[1:1 + node_feat_space.sum(), node, node] = convert(node_feat, node_feat_space)Line too long (85 > 79 characters):
214 target, source = graph.edge_index[0][edge], graph.edge_index[1][edge]Line too long (106 > 79 characters):
216 adj_feat[1 + node_feat_space.sum():, target, source] = convert(edge_feat, edge_feat_space)