Skip to content

Commit

Permalink
Internal change.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 446058586
  • Loading branch information
Googler authored and Jagadeesh J committed May 11, 2022
1 parent 34b5d0b commit e453fe3
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@
from kfp.components import load_component_from_file

__all__ = [
'CvTrainerOp', 'InfraValidatorOp', 'Stage1TunerOp', 'EnsembleOp',
'StatsAndExampleGenOp', 'FeatureSelectionOp', 'TransformOp', 'FinalizerOp',
'WideAndDeepTrainerOp', 'BuiltinAlgorithmHyperparameterTuningJobOp',
'TabNetTrainerOp', 'FeatureTransformEngineOp'
'CvTrainerOp',
'InfraValidatorOp',
'Stage1TunerOp',
'EnsembleOp',
'StatsAndExampleGenOp',
'FeatureSelectionOp',
'TransformOp',
'FinalizerOp',
'WideAndDeepTrainerOp',
'BuiltinAlgorithmHyperparameterTuningJobOp',
'TabNetTrainerOp',
'FeatureTransformEngineOp',
'FteTransformConfigurationOp',
]

CvTrainerOp = load_component_from_file(
Expand All @@ -43,6 +52,10 @@
os.path.join(os.path.dirname(__file__), 'transform.yaml'))
FeatureTransformEngineOp = load_component_from_file(
os.path.join(os.path.dirname(__file__), 'feature_transform_engine.yaml'))
FteTransformConfigurationOp = load_component_from_file(
os.path.join(
os.path.dirname(__file__),
'feature_transform_engine_transform_configuration.yaml'))
FinalizerOp = load_component_from_file(
os.path.join(os.path.dirname(__file__), 'finalizer.yaml'))
WideAndDeepTrainerOp = load_component_from_file(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Copyright 2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: feature_transform_engine_transform_configuration
description: |
Generates an Fte transform configuration for our dataset when not specified by the user.
Args:
project (str):
Required. Project to run Fte transform configuration
location (Optional[str]):
Location for running the te transform configuration. If not set, default to us-central1
root_dir (str): The Cloud Storage location to store the output.
metadata_path (str): The metadata of the dataset
dataset_stats_path (str): The dataset stats of the dataset
encryption_spec_key_name (Optional[str]):
Customer-managed encryption key
Returns:
fte_transform_configuration_artifact_path (str): The path to the fte transform configutation path.
gcp_resources (str):
GCP resources created by this component.
For more details, see https://github.com/kubeflow/pipelines/blob/master/components/google-cloud/google_cloud_pipeline_components/proto/README.md.
inputs:
- {name: project, type: String}
- {name: location, type: String, optional: True, default: "us-central1"}
- {name: root_dir, type: String}
- {name: metadata_path, type: String}
- {name: dataset_stats_path, type: String}
- {name: encryption_spec_key_name, type: String, default: ""}

outputs:
- {name: fte_transform_configuration_artifact_path, type: String}
- {name: gcp_resources, type: String}

implementation:
container:
image: gcr.io/ml-pipeline/google-cloud-pipeline-components:latest
command: [python3, -u, -m, google_cloud_pipeline_components.container.v1.gcp_launcher.launcher]
args: [
--type, CustomJob,
--project, {inputValue: project},
--location, {inputValue: location},
--gcp_resources, {outputPath: gcp_resources},
--payload,
concat: [
'{"display_name": "automl-tabular-transform-{{$.pipeline_job_uuid}}-{{$.pipeline_task_uuid}}", "encryption_spec": {"kms_key_name":"',
{inputValue: encryption_spec_key_name},
'"}, "job_spec": {"worker_pool_specs": [{"replica_count": 1, "machine_spec": {"machine_type": "n1-standard-8"}, "container_spec": {"image_uri":"',
'us-docker.pkg.dev/vertex-ai-restricted/automl-tabular/training:prod',
'", "args": ["transform_configuration", "--fte_transform_configuration_artifact_path=',
{outputPath: fte_transform_configuration_artifact_path},
'", "--fte_transform_configuration_path=',
{inputValue: root_dir},
'/{{$.pipeline_job_uuid}}/{{$.pipeline_task_uuid}}/transform_configuration", "--metadata_path=',
{inputValue: metadata_path},
'", "--dataset_stats_path=',
{inputValue: dataset_stats_path},
'"]}}]}}'
]]

0 comments on commit e453fe3

Please sign in to comment.