-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: #3351 #3353
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: #3351 #3353
Conversation
This PR closes: #3351 |
Codecov Report
@@ Coverage Diff @@
## master #3353 +/- ##
==========================================
+ Coverage 88.72% 89.70% +0.97%
==========================================
Files 152 152
Lines 10806 10843 +37
==========================================
+ Hits 9588 9727 +139
+ Misses 1218 1116 -102
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Latency summaryCurrent PR yields:
Breakdown
Backed by latency-tracking. Further commits will update this comment. |
jina/jaml/parsers/executor/legacy.py
Outdated
except Exception as e: | ||
print(f'========= {e}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
except Exception as e: | |
print(f'========= {e}') | |
except Exception: | |
pass # intentionally pass as <write why there is no reason to handle it> |
df6264f
to
3becf72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment on a comment :) And one question as I am confused by the if
jina/jaml/parsers/executor/legacy.py
Outdated
"""Based on name, compute if this is a tail/head Pea or a main Pea | ||
|
||
:param data: the data for the parser | ||
:return: boolean of whether it is tail/head or main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that description is slightly misleading? I assume this is True if it is head/tail .
So I'd write :return: boolean True if it is tail/head., False otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjusted, thanks
jina/jaml/parsers/executor/legacy.py
Outdated
@@ -78,7 +78,8 @@ def parse(self, cls: Type['BaseExecutor'], data: Dict) -> 'BaseExecutor': | |||
arguments_from_cls = LegacyParser._get_all_arguments(cls) | |||
arguments_from_yaml = set(data.get('with', {})) | |||
difference_set = arguments_from_yaml - arguments_from_cls | |||
if any(difference_set): | |||
# only log warnings about unknown args for main Pea | |||
if any(difference_set) and LegacyParser.is_tail_or_head(data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I somehow dont get this one? Your comment says you only want to do this for a main pea but then you enter the if here if it is tail/head? I guess I am missing something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed that. Initially I wanted the method to return if it's a main Pea. But switched it around and forgot to change here. The pains of not having a proper test for logging
3becf72
to
426d259
Compare
426d259
to
20f28d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good 👍
No description provided.