Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Make rpc and tensorlist part of PBG
Browse files Browse the repository at this point in the history
Reviewed By: adamlerer

Differential Revision: D17742505

fbshipit-source-id: 6791a0a57127989f5af3ef0b63cee7b05f1b111f
  • Loading branch information
lw authored and facebook-github-bot committed Oct 4, 2019
1 parent 5d43050 commit 3ee2838
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 31 deletions.
2 changes: 1 addition & 1 deletion test/test_entitylist.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from unittest import TestCase, main

import torch
from torch_extensions.tensorlist.tensorlist import TensorList

from torchbiggraph.entitylist import EntityList
from torchbiggraph.tensorlist import TensorList


def tensor_list_from_lists(lists: Sequence[Sequence[int]]) -> TensorList:
Expand Down
2 changes: 1 addition & 1 deletion test/test_graph_storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import h5py
import numpy as np
import torch
from torch_extensions.tensorlist.tensorlist import TensorList

from torchbiggraph.graph_storages import FileEdgeAppender
from torchbiggraph.tensorlist import TensorList


class TestFileEdgeAppender(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion test/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from unittest import TestCase, main

import torch
from torch_extensions.tensorlist.tensorlist import TensorList

from torchbiggraph.entitylist import EntityList
from torchbiggraph.model import (
Expand All @@ -39,6 +38,7 @@
TranslationOperator,
match_shape,
)
from torchbiggraph.tensorlist import TensorList


class TensorTestCase(TestCase):
Expand Down
1 change: 0 additions & 1 deletion torch_extensions/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions torch_extensions/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions torch_extensions/rpc/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions torch_extensions/tensorlist/__init__.py

This file was deleted.

3 changes: 1 addition & 2 deletions torchbiggraph/bucket_scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
from abc import ABC, abstractmethod
from typing import Dict, List, NamedTuple, Optional, Set, Tuple

from torch_extensions.rpc.rpc import Client, Server

from torchbiggraph.config import BucketOrder
from torchbiggraph.distributed import Startable
from torchbiggraph.rpc import Client, Server
from torchbiggraph.stats import Stats
from torchbiggraph.types import Bucket, EntityName, Partition, Rank, Side

Expand Down
2 changes: 1 addition & 1 deletion torchbiggraph/entitylist.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from typing import Any, Sequence, Union

import torch
from torch_extensions.tensorlist.tensorlist import TensorList

from torchbiggraph.tensorlist import TensorList
from torchbiggraph.types import LongTensorType


Expand Down
2 changes: 1 addition & 1 deletion torchbiggraph/graph_storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import h5py
import numpy as np
import torch
from torch_extensions.tensorlist.tensorlist import TensorList

from torchbiggraph.edgelist import EdgeList
from torchbiggraph.entitylist import EntityList
from torchbiggraph.plugin import URLPluginRegistry
from torchbiggraph.tensorlist import TensorList
from torchbiggraph.util import CouldNotLoadData


Expand Down
2 changes: 1 addition & 1 deletion torchbiggraph/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch_extensions.tensorlist.tensorlist import TensorList

from torchbiggraph.config import (
ConfigSchema,
Expand All @@ -34,6 +33,7 @@
from torchbiggraph.entitylist import EntityList
from torchbiggraph.graph_storages import RELATION_TYPE_STORAGES
from torchbiggraph.plugin import PluginRegistry
from torchbiggraph.tensorlist import TensorList
from torchbiggraph.types import FloatTensorType, LongTensorType, Side
from torchbiggraph.util import CouldNotLoadData

Expand Down
2 changes: 1 addition & 1 deletion torchbiggraph/parameter_sharing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ParameterServer(Startable):
get tensors by string key. Operations on the parameter server are globally
synchronous.
FIXME: torch_extensions.rpc should be fixed to not require torch.serialization,
FIXME: torchbiggraph.rpc should be fixed to not require torch.serialization,
then most of this code can be removed.
FIXME: torch.distributed.recv should not require you to provide the
tensor to write to; the type and size should be sent in the header.
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3ee2838

Please sign in to comment.