Line too long (114 > 79 characters):
20 def __init__(self, version=None, root_dir='data', download=False, split_scheme='official', random_split=False,Line too long (85 > 79 characters):
24 self.ogb_dataset = PyGRotatedMNISTDataset(name='RotatedMNIST', root=root_dir)Line too long (138 > 79 characters):
31 self._y_type = 'float' # although the task is binary classification, the prediction target contains nan value, thus we need floatLine too long (86 > 79 characters):
40 #https://www.dropbox.com/s/zulrcyh846w9maw/RotatedMNIST_group_expired.zip?dl=1Line too long (93 > 79 characters):
41 metadata_file_path = os.path.join(self.ogb_dataset.raw_dir, 'RotatedMNIST_group.npy')Line too long (114 > 79 characters):
44 'https://www.dropbox.com/s/xv6bx7ihqmeuv80/RotatedMNIST_group.zip?dl=1', self.ogb_dataset.raw_dir)Line too long (103 > 79 characters):
48 self._metadata_array_wo_y = torch.from_numpy(np.load(metadata_file_path)).reshape(-1, 1).long()Line too long (94 > 79 characters):
50 torch.unsqueeze(self.ogb_dataset.data.y, dim=1)), 1)Line too long (93 > 79 characters):
57 val_split_idx = random_index[int(4 / 6 * dataset_size):int(5 / 6 * dataset_size)]Line too long (113 > 79 characters):
62 train_val_group_idx, test_group_idx = torch.tensor(train_val_group_idx), torch.tensor(test_group_idx)Line too long (104 > 79 characters):
65 split_idx = torch.zeros(len(torch.squeeze(self._metadata_array_wo_y)), dtype=torch.bool)Line too long (82 > 79 characters):
67 split_idx += (torch.squeeze(self._metadata_array_wo_y) == idx)Line too long (107 > 79 characters):
70 train_val_split_idx, test_split_idx = split_idx(train_val_group_idx), split_idx(test_group_idx)Line too long (100 > 79 characters):
72 train_val_split_idx = torch.arange(dataset_size, dtype=torch.int64)[train_val_split_idx]Line too long (98 > 79 characters):
75 train_split_idx = train_val_split_idx[random_index[:int(4 / 5 * train_val_sets_size)]]Line too long (96 > 79 characters):
76 val_split_idx = train_val_split_idx[random_index[int(4 / 5 * train_val_sets_size):]]Line too long (114 > 79 characters):
100 subgraph = GSN(dataset_name='RotatedMNIST', dataset_group='MNIST', induced=True, id_type=self.id_type,Line too long (116 > 79 characters):
102 self.graphs_ptg, self.encoder_ids, self.d_id, self.d_degree = subgraph.preprocess(self.ogb_dataset.root)Line too long (86 > 79 characters):
113 self.num_edge_features = self.graphs_ptg[0].edge_features.shape[1]Line too long (91 > 79 characters):
136 - prediction_fn (function): A function that turns y_pred into predicted labels.Line too long (106 > 79 characters):
137 Only None is supported because OGB Evaluators accept binary logitsLine too long (121 > 79 characters):
142 assert prediction_fn is None, "OGBPCBADataset.eval() does not support prediction_fn. Only binary logits accepted"Line too long (89 > 79 characters):
154 deg_inv = torch.where(deg > 0, 1. / torch.sqrt(deg), torch.zeros(deg.size()))Line too long (109 > 79 characters):
164 adj = _sym_normalize_adj(to_dense_adj(graph.edge_index, max_num_nodes=graph.x.size(0)).squeeze())