-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(sdk): Fix "No KFP components found in file" error. Fixes #8353 #8359
Conversation
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.
/lgtm
Thanks for this fix, @chensun.
@@ -172,9 +172,9 @@ def _load_components(self): | |||
|
|||
python_file = str(python_file) | |||
if not component_modules: | |||
logging.error( |
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.
nit/question: I'm curious what this logging adds without the check.
I think the logging on line 175 is now redundant with the logging on line 179, since the execution will not sys.exit
anymore. WDYT about either [simpler approach] removing the entire if not component_modules
block or [more involved approach] changing the logging to something like the following:
comp_dir/file.py
comp_dir/other_file.py
comp_dir/component.py [component]
I'm not sure [component]
is the best way of visually displaying this information, but just thinking out loud with this mock up.
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.
Good point! I'll opt for removing this if block.
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.
/lgtm
/approve
Thank you!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: connor-mccarthy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…#8353 (kubeflow#8359) * Update component.py * Update component.py * Update component.py
Description of your changes:
Utility files may not have KFP component definition, which is completely normal and should be allowed.
Fixes #8353
Checklist: