VQGraph icon indicating copy to clipboard operation
VQGraph copied to clipboard

An undefined function in dataloader.py

Open SwaggyZhang opened this issue 11 months ago • 0 comments

Dear authors,

Thank you for releasing your work!

During my learning, I find that an undefined function "rand_train_test_idx()" is invoked in line 284 of the dataloader.py:

def get_idx_split(self, split_type="random", train_prop=0.5, valid_prop=0.25):
        """
        train_prop: The proportion of dataset for train split. Between 0 and 1.
        valid_prop: The proportion of dataset for validation split. Between 0 and 1.
        """

        if split_type == "random":
            ignore_negative = False if self.name == "ogbn-proteins" else True
            train_idx, valid_idx, test_idx = rand_train_test_idx(
                self.label,
                train_prop=train_prop,
                valid_prop=valid_prop,
                ignore_negative=ignore_negative,
            )
            split_idx = {"train": train_idx, "valid": valid_idx, "test": test_idx}
        return split_idx

Is that a customed function?

Looking forward to your reply!

SwaggyZhang avatar Mar 20 '24 02:03 SwaggyZhang