Skip to content
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

fix: conditional args #1682

Merged
merged 1 commit into from
Jan 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions jina/peapods/pods/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def _set_conditional_args(args):
args.runtime_cls = 'RESTRuntime'
else:
args.runtime_cls = 'GRPCRuntime'
if 'parallel' in args and args.parallel == 1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parallel is now guaranteed to be in args

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it would be good to add a warning

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parallel is now guaranteed to be in args

not in case the gateway is added

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, is a smell but good point

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and it would be good to add a warning

Thanks, good idea!
However, this is actually expected behaviour:
The documentation for --separated-workspace in mixin_zed_runtime_parser says: the data and config files are separated for each pea in this pod, only effective when BasePod\'s parallel > 1.
In addition there is no logging used in jina/peapods/pods/__init__.py for all similar cases.

args.separated_workspace = False

def connect_to_tail_of(self, pod: 'BasePod'):
"""Eliminate the head node by connecting prev_args node directly to peas """
Expand Down