8000 fix: add warning by JoanFM · Pull Request #1804 · jina-ai/serve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: add warning #1804

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

Merged
merged 2 commits into from
Jan 28, 2021
Merged
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
3 changes: 3 additions & 0 deletions jina/parsers/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import uuid

_SHOW_ALL_ARGS = 'JINA_FULL_CLI' in os.environ
if _SHOW_ALL_ARGS:
from jina.logging import default_logger
default_logger.warning(f'Setting {_SHOW_ALL_ARGS} will make remote Peas with sharding not work when using JinaD')


def add_arg_group(parser, title):
Expand Down
3 changes: 2 additions & 1 deletion jina/peapods/pods/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from ... import __default_host__
from ...enums import SchedulerType, SocketType, PeaRoleType
from ...helper import random_port, get_public_ip, get_internal_ip
from ...helper import random_port, get_public_ip, get_internal_ip, random_identity


def _set_peas_args(args: Namespace, head_args: Namespace = None, tail_args: Namespace = None) -> List[Namespace]:
Expand Down Expand Up @@ -35,6 +35,7 @@ def _set_peas_args(args: Namespace, head_args: Namespace = None, tail_args: Name
if args.parallel > 1:
_args.pea_id = idx + 1 #: if it is parallel, then pea_id is 1-indexed
_args.pea_role = PeaRoleType.PARALLEL
_args.identity = random_identity()
if _args.name:
_args.name += f'/{_args.pea_id}'
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ def test_flow(docker_compose):
print(f'\nQuerying any text')
r = assert_request(method='post',
url='http://0.0.0.0:45678/api/search',
payload={'top_k': 10, 'data': ['text:anything will match the same']})
payload={'top_k': 100, 'data': ['text:anything will match the same']})
print(f'returned: {r}')
texts_matched = r['search']['docs'][0]['matches']
assert len(texts_matched) == 10
assert len(texts_matched) == 100

assert_request(method='get',
url=f'http://localhost:8000/flows/{query_flow_id}')
Expand Down
0