Skip to content

Commit

Permalink
feat(client): add input function sugar
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed May 29, 2020
1 parent eb1045c commit 1875eaf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import unittest
from pathlib import Path

from pkg_resources import resource_filename

from jina.clients import py_client
from jina.clients.python.io import input_numpy
from jina.flow import Flow
from jina.helloworld import download_data, input_fn
from jina.helloworld import download_data
from jina.main.parser import set_hw_parser
from pkg_resources import resource_filename
from tests import JinaTestCase


Expand Down Expand Up @@ -59,7 +61,7 @@ def test_helloworld_flow(self):
with f:
py_client(host=f.host,
port_grpc=f.port_grpc,
).index(input_fn(targets['index']['filename']), batch_size=args.index_batch_size)
).index(input_numpy(targets['index']['data']), batch_size=args.index_batch_size)


if __name__ == '__main__':
Expand Down

0 comments on commit 1875eaf

Please sign in to comment.