(self)
| 882 | print("Done saving data into cached files.") |
| 883 | |
| 884 | def load(self): |
| 885 | self.graphs, labels = load_graphs(str(self.graph_path)) |
| 886 | |
| 887 | self.labels = [] |
| 888 | for i in range(len(labels)): |
| 889 | self.labels.append(F.asnumpy(labels["{}".format(i)])) |
| 890 | # load pmpds under self.raw_path |
| 891 | with open("{}/pmpds.pkl".format(self.raw_path), "rb") as f: |
| 892 | self.pmpds = _pickle_load(f) |
| 893 | if self.verbose: |
| 894 | print("Done loading data into cached files.") |
| 895 | # sanity check |
| 896 | assert len(self.graphs) == len(self.pmpds) |
| 897 | assert len(self.graphs) == len(self.labels) |
| 898 | |
| 899 | def __len__(self): |
| 900 | return len(self.graphs) |
no test coverage detected