!28311 Add description of enum class

Merge pull request !28311 from shenwei41/code_docs_api
This commit is contained in:
i-robot 2021-12-28 09:08:51 +00:00 committed by Gitee
commit af0b9bb119
2 changed files with 13 additions and 1 deletions

View File

@ -100,7 +100,12 @@ OffloadToManualOffloadMode = {
class Shuffle(str, Enum):
"""Specify the shuffle mode."""
"""Specify the shuffle mode.
- GLOBAL: Shuffle both the files and samples.
- FILES: Shuffle files only.
- INFILE: Shuffle data within each file.
"""
GLOBAL: str = "global"
FILES: str = "files"
INFILE: str = "infile"

View File

@ -35,6 +35,9 @@ from .validators import check_gnn_graphdata, check_gnn_get_all_nodes, check_gnn_
class SamplingStrategy(IntEnum):
"""
Specifies the sampling strategy when execute `get_sampled_neighbors`.
- RANDOM: Random sampling with replacement.
- EDGE_WEIGHT: Sampling with edge weight as probability.
"""
RANDOM = 0
EDGE_WEIGHT = 1
@ -49,6 +52,10 @@ DE_C_INTER_SAMPLING_STRATEGY = {
class OutputFormat(IntEnum):
"""
Specifies the output storage format when execute `get_all_neighbors`.
- NORMAL: Normal format.
- COO: COO format.
- CSR: CSR format.
"""
NORMAL = 0
COO = 1