Line too long (114 > 79 characters):
21 def __init__(self, version=None, root_dir='data', download=False, split_scheme='official', random_split=False,Line too long (90 > 79 characters):
25 self.ogb_dataset = PyGSBMEnvironmentDataset(name='SBM-Environment', root=root_dir)Line too long (138 > 79 characters):
32 self._y_type = 'float' # although the task is binary classification, the prediction target contains nan value, thus we need floatLine too long (96 > 79 characters):
41 metadata_file_path = os.path.join(self.ogb_dataset.raw_dir, 'SBM-Environment_group.npy')Line too long (117 > 79 characters):
44 'https://www.dropbox.com/s/5xjd13f2qfiyku5/SBM-Environment_group.zip?dl=1', self.ogb_dataset.raw_dir)Line too long (103 > 79 characters):
47 self._metadata_array_wo_y = torch.from_numpy(np.load(metadata_file_path)).reshape(-1, 1).long()Line too long (94 > 79 characters):
49 torch.unsqueeze(self.ogb_dataset.data.y, dim=1)), 1)Line too long (93 > 79 characters):
56 val_split_idx = random_index[int(2 / 4 * dataset_size):int(3 / 4 * dataset_size)]Line too long (113 > 79 characters):
61 train_val_group_idx, test_group_idx = torch.tensor(train_val_group_idx), torch.tensor(test_group_idx)Line too long (104 > 79 characters):
64 split_idx = torch.zeros(len(torch.squeeze(self._metadata_array_wo_y)), dtype=torch.bool)Line too long (82 > 79 characters):
66 split_idx += (torch.squeeze(self._metadata_array_wo_y) == idx)Line too long (107 > 79 characters):
69 train_val_split_idx, test_split_idx = split_idx(train_val_group_idx), split_idx(test_group_idx)Line too long (100 > 79 characters):
71 train_val_split_idx = torch.arange(dataset_size, dtype=torch.int64)[train_val_split_idx]Line too long (98 > 79 characters):
74 train_split_idx = train_val_split_idx[random_index[:int(2 / 3 * train_val_sets_size)]]Line too long (96 > 79 characters):
75 val_split_idx = train_val_split_idx[random_index[int(2 / 3 * train_val_sets_size):]]Line too long (91 > 79 characters):
103 - prediction_fn (function): A function that turns y_pred into predicted labels.Line too long (106 > 79 characters):
104 Only None is supported because OGB Evaluators accept binary logitsLine too long (121 > 79 characters):
109 assert prediction_fn is None, "OGBPCBADataset.eval() does not support prediction_fn. Only binary logits accepted"Line too long (89 > 79 characters):
121 deg_inv = torch.where(deg > 0, 1. / torch.sqrt(deg), torch.zeros(deg.size()))Line too long (109 > 79 characters):
133 adj = _sym_normalize_adj(to_dense_adj(graph.edge_index, max_num_nodes=graph.x.size(0)).squeeze())Line too long (114 > 79 characters):
148 adj_feat[1:1+node_feat_space.sum(), node, node] = convert(node_feat.unsqueeze(0), node_feat_space)