def load()

in src/classes/qadataset.py [0:0]


    def load(cls, name: str):
        """Loads and returns a QADataset object that has already been 
        `self.preprocess` and `self.save()`d

        Args:
            name: Identifying name of this dataset.
        """
        preprocessed_path = cls._get_norm_dataset_path(name)
        assert os.path.exists(
            preprocessed_path
        ), f"Preprocessed dataset should be at {preprocessed_path}."
        with gzip.open(preprocessed_path, "r") as inf:
            header = json.loads(inf.readline())
            assert header["dataset"] == name
            examples = [QAExample.json_load(l) for l in inf.readlines()]

        print(f"Read {len(examples)} examples from {preprocessed_path}")
        return cls(name, header["original_path"], preprocessed_path, examples)