Skip to content

Commit

Permalink
Remotemixin to operator (towhee-io#1875)
Browse files Browse the repository at this point in the history
Signed-off-by: shiyu22 <[email protected]>

Signed-off-by: shiyu22 <[email protected]>
  • Loading branch information
shiyu22 authored Aug 26, 2022
1 parent 776f4b9 commit 77d1e54
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 78 deletions.
17 changes: 0 additions & 17 deletions tests/unittests/functional/test_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import towhee.functional.mixins.state
import towhee.functional.mixins.serve
import towhee.functional.mixins.config
import towhee.functional.mixins.remote
import towhee.functional.mixins.data_processing
import towhee.functional.mixins.safe
import towhee.functional.mixins.list
Expand All @@ -57,7 +56,6 @@ def load_tests(loader, tests, ignore):
towhee.functional.mixins.serve,
towhee.functional.mixins.column,
towhee.functional.mixins.config,
towhee.functional.mixins.remote,
towhee.functional.mixins.list,
towhee.functional.mixins.data_processing,
towhee.functional.mixins.stream,
Expand Down Expand Up @@ -314,20 +312,5 @@ def inner_distance1(query, data):
)


class TestRemoteMixin(unittest.TestCase):
"""
Unit test for RemoteMixin
"""
def test_remote(self):
dc_1 = DataCollection(((1, 2, 3, 4, 5, 6), (2, 3, 4, 5, 6, 7)))
remote = dc_1.remote('127.0.0.1:8001', mode='infer', protocol='grpc')
self.assertEqual(remote[0], None)

def test_remote_error(self):
dc_2 = DataCollection(((1, 2, 3, 4, 5, 6), (2, 3, 4, 5, 6, 7)))
remote = dc_2.remote('127.0.0.1:8000', mode='async_infer', protocol='http')
self.assertEqual(remote[0], None)


if __name__ == '__main__':
unittest.main()
3 changes: 1 addition & 2 deletions towhee/functional/mixins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from .dag import DagMixin
from .config import ConfigMixin
from .compile import CompileMixin
from .remote import RemoteMixin
from .list import ListMixin
from .data_processing import DataProcessingMixin
from .stream import StreamMixin
Expand All @@ -38,7 +37,7 @@
class DCMixins(DatasetMixin, DispatcherMixin, DisplayMixin, ParallelMixin,
ComputerVisionMixin, StateMixin, MetricMixin, RayMixin,
ServeMixin, MilvusMixin, DagMixin, FaissMixin, ConfigMixin,
CompileMixin, RemoteMixin, ListMixin, DataProcessingMixin,
CompileMixin, ListMixin, DataProcessingMixin,
SafeMixin, StreamMixin, FormatPriorityMixin, AudioMixin):

def __init__(self) -> None: # pylint: disable=useless-super-delegation
Expand Down
59 changes: 0 additions & 59 deletions towhee/functional/mixins/remote.py

This file was deleted.

0 comments on commit 77d1e54

Please sign in to comment.