Skip to content

Commit

Permalink
chore(components/google-cloud): Alias create_custom_training_job_op_f…
Browse files Browse the repository at this point in the history
…rom_component to create_custom_training_job_from_component

PiperOrigin-RevId: 441899934
  • Loading branch information
Googler committed Apr 15, 2022
1 parent d452261 commit a85dc4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

import os

from .utils import create_custom_training_job_op_from_component
# Aliasing for better readability
create_custom_training_job_from_component = create_custom_training_job_op_from_component

try:
from kfp.v2.components import load_component_from_file
except ImportError:
Expand All @@ -23,9 +27,8 @@
__all__ = [
'CustomTrainingJobOp',
'create_custom_training_job_op_from_component',
'create_custom_training_job_from_component',
]


CustomTrainingJobOp = load_component_from_file(
os.path.join(os.path.dirname(__file__), 'component.yaml'))

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
_EXECUTOR_PLACE_HOLDER_REPLACEMENT = '{{$.json_escape[1]}}'


# This method is aliased to "create_custom_training_job_from_component" for
# better readability
def create_custom_training_job_op_from_component(
component_spec: Callable, # pylint: disable=g-bare-generic
display_name: Optional[str] = '',
Expand Down

0 comments on commit a85dc4f

Please sign in to comment.