Skip to content

[WIP] dataset api naming improvements #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/distributed/heterogeneous_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from gigl.distributed import (
DistLinkPredictionDataset,
DistributedContext,
build_dataset_from_task_config_uri,
build_link_pred_dataset_from_task_config,
)
from gigl.src.common.models.pyg.heterogeneous import HGT
from gigl.src.common.models.pyg.link_prediction import (
Expand Down Expand Up @@ -343,7 +343,7 @@ def _run_example_inference(

# We call a GiGL function to launch a process for loading TFRecords into memory, partitioning the graph across multiple machines,
# and registering that information to a DistLinkPredictionDataset class.
dataset = build_dataset_from_task_config_uri(
dataset = build_link_pred_dataset_from_task_config(
task_config_uri=task_config_uri, distributed_context=distributed_context
)

Expand Down
4 changes: 2 additions & 2 deletions examples/distributed/homogeneous_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from gigl.distributed import (
DistLinkPredictionDataset,
DistributedContext,
build_dataset_from_task_config_uri,
build_link_pred_dataset_from_task_config,
)
from gigl.src.common.models.pyg.homogeneous import GraphSAGE
from gigl.src.common.models.pyg.link_prediction import (
Expand Down Expand Up @@ -336,7 +336,7 @@ def _run_example_inference(

# We call a GiGL function to launch a process for loading TFRecords into memory, partitioning the graph across multiple machines,
# and registering that information to a DistLinkPredictionDataset class.
dataset = build_dataset_from_task_config_uri(
dataset = build_link_pred_dataset_from_task_config(
task_config_uri=task_config_uri, distributed_context=distributed_context
)

Expand Down
13 changes: 11 additions & 2 deletions python/gigl/distributed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
GLT Distributed Classes implemented in GiGL
"""

__all__ = [
"DistNeighborLoader",
"DistLinkPredictionDataset",
"DistributedContext",
"DistPartitioner",
"DistRangePartitioner",
"build_dataset",
"build_link_pred_dataset_from_task_config",
]

from gigl.distributed.dataset_factory import (
build_dataset,
build_dataset_from_task_config_uri,
build_link_pred_dataset_from_task_config,
)
from gigl.distributed.dist_ablp_neighborloader import DistABLPLoader
from gigl.distributed.dist_context import DistributedContext
from gigl.distributed.dist_link_prediction_dataset import DistLinkPredictionDataset
from gigl.distributed.dist_partitioner import DistPartitioner
Expand Down
2 changes: 1 addition & 1 deletion python/gigl/distributed/dataset_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def build_dataset(
return output_dataset


def build_dataset_from_task_config_uri(
def build_link_pred_dataset_from_task_config(
task_config_uri: Union[str, Uri],
distributed_context: DistributedContext,
is_inference: bool = True,
Expand Down