"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "799f5b4e12c5350872b6fe5ebc28be423d2570c3"
Unverified Commit aff6b685 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Misc] Avoid using Literal which requires python 3.8. (#6493)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent e6a15c1a
...@@ -39,8 +39,6 @@ main ...@@ -39,8 +39,6 @@ main
""" """
import argparse import argparse
from typing import Literal
import dgl.graphbolt as gb import dgl.graphbolt as gb
import dgl.nn as dglnn import dgl.nn as dglnn
import torch import torch
...@@ -50,9 +48,7 @@ import torchmetrics.functional as MF ...@@ -50,9 +48,7 @@ import torchmetrics.functional as MF
from tqdm import tqdm from tqdm import tqdm
def create_dataloader( def create_dataloader(args, graph, features, itemset, job):
args, graph, features, itemset, job: Literal["train", "evaluate", "infer"]
):
""" """
[HIGHLIGHT] [HIGHLIGHT]
Get a GraphBolt version of a dataloader for node classification tasks. Get a GraphBolt version of a dataloader for node classification tasks.
...@@ -70,7 +66,7 @@ def create_dataloader( ...@@ -70,7 +66,7 @@ def create_dataloader(
The node features. The node features.
itemset : Union[ItemSet, ItemSetDict] itemset : Union[ItemSet, ItemSetDict]
Data to be sampled. Data to be sampled.
job : Literal["train", "evaluate", "infer"] job : one of ["train", "evaluate", "infer"]
The stage where dataloader is created, with options "train", "evaluate" The stage where dataloader is created, with options "train", "evaluate"
and "infer". and "infer".
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment