# Copyright 2019 Google LLC # # 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: Train T2T model description: | A Kubeflow Pipeline component to train a Tensor2Tensor model metadata: labels: add-pod-env: 'true' inputs: - name: train_steps description: '...' type: Integer default: 2019300 - name: data_dir description: '...' type: GCSPath - name: model_dir description: '...' type: GCSPath - name: action description: '...' type: String - name: deploy_webapp description: '...' type: String outputs: - name: launch_server description: '...' type: String - name: train_output_path description: '...' type: GCSPath - name: MLPipeline UI metadata type: UI metadata implementation: container: image: gcr.io/google-samples/ml-pipeline-t2ttrain:v3ap args: [ --data-dir, {inputValue: data_dir}, --action, {inputValue: action}, --model-dir, {inputValue: model_dir}, --train-steps, {inputValue: train_steps}, --deploy-webapp, {inputValue: deploy_webapp}, --train-output-path, {outputPath: train_output_path} ] env: KFP_POD_NAME: "{{pod.name}}" fileOutputs: launch_server: /tmp/output MLPipeline UI metadata: /mlpipeline-ui-metadata.json