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

SDK - Fixed the capitalization in _python_function_name_to_component_name #2688

Merged
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: 2 additions & 1 deletion sdk/python/kfp/components/_python_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def set_default_base_image(image_or_factory: Union[str, Callable[[], str]]):

def _python_function_name_to_component_name(name):
import re
return re.sub(' +', ' ', name.replace('_', ' ')).strip(' ').capitalize()
name_with_spaces = re.sub(' +', ' ', name.replace('_', ' ')).strip(' ')
return name_with_spaces[0].upper() + name_with_spaces[1:]
numerology marked this conversation as resolved.
Show resolved Hide resolved


def _capture_function_code_using_cloudpickle(func, modules_to_capture: List[str] = None) -> str:
Expand Down