Removing all component.yaml files

Signed-off-by: Shrinath Suresh <shrinath@ideas2it.com>
This commit is contained in:
Shrinath Suresh 2021-08-04 22:12:11 +05:30
parent df5d1ae7e3
commit db75951949
6 changed files with 0 additions and 301 deletions

View File

@ -1,34 +0,0 @@
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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: PreProcessData
description: |
Prepare data for PyTorch training.
outputs:
- {name: output_data, description: 'The path to the input datasets'}
- {name: MLPipeline UI Metadata, description: 'Path to generate MLPipeline UI Metadata'}
implementation:
container:
# For GPU use
# image: public.ecr.aws/pytorch-samples/kfp_samples:latest-gpu
image: public.ecr.aws/pytorch-samples/kfp_samples:latest
command: ["python3", "bert/bert_pre_process.py"]
args:
- --output_path
- {outputPath: output_data}
- --mlpipeline_ui_metadata
- { outputPath: MLPipeline UI Metadata }

View File

@ -1,47 +0,0 @@
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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: Training
description: |
Pytorch training
inputs:
- {name: input_data, description: 'Input dataset path'}
- {name: bert_script_args, description: 'Arguments to the bert script'}
- {name: ptl_arguments, description: 'Arguments to pytorch lightning Trainer'}
outputs:
- {name: tensorboard_root, description: "Tensorboard output path"}
- {name: checkpoint_dir, description: "Model checkpoint output"}
- {name: MLPipeline UI Metadata, description: "MLPipeline UI Metadata output"}
- {name: MLPipeline Metrics, description: "MLPipeline Metrics output"}
implementation:
container:
# For GPU use
# image: public.ecr.aws/pytorch-samples/kfp_samples:latest-gpu
image: public.ecr.aws/pytorch-samples/kfp_samples:latest
command: ["python3", "bert/agnews_classification_pytorch.py"]
args:
- --dataset_path
- {inputPath: input_data}
- --script_args
- { inputValue: bert_script_args }
- --ptl_args
- { inputValue: ptl_arguments }
- --tensorboard_root
- {outputPath: tensorboard_root}
- --checkpoint_dir
- {outputPath: checkpoint_dir}
- --mlpipeline_ui_metadata
- {outputPath: MLPipeline UI Metadata}
- --mlpipeline_metrics
- {outputPath: MLPipeline Metrics}

View File

@ -1,54 +0,0 @@
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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: Kubeflow - Serve Model using KFServing
description: Serve Models using Kubeflow KFServing
inputs:
- {name: Action, type: String, default: 'create', description: 'Action to execute on KFServing'}
- {name: Model Name, type: String, default: '', description: 'Name to give to the deployed model'}
- {name: Model URI, type: String, default: '', description: 'Path of the S3 or GCS compatible directory containing the model.'}
- {name: Canary Traffic Percent, type: String, default: '100', description: 'The traffic split percentage between the candidate model and the last ready model'}
- {name: Namespace, type: String, default: '', description: 'Kubernetes namespace where the KFServing service is deployed.'}
- {name: Framework, type: String, default: '', description: 'Machine Learning Framework for Model Serving.'}
- {name: Custom Model Spec, type: String, default: '{}', description: 'Custom model runtime container spec in JSON'}
- {name: Autoscaling Target, type: String, default: '0', description: 'Autoscaling Target Number'}
- {name: Service Account, type: String, default: '', description: 'ServiceAccount to use to run the InferenceService pod'}
- {name: Enable Istio Sidecar, type: Bool, default: 'True', description: 'Whether to enable istio sidecar injection'}
- {name: InferenceService YAML, type: String, default: '{}', description: 'Raw InferenceService serialized YAML for deployment'}
- {name: Watch Timeout, type: String, default: '300', description: "Timeout seconds for watching until InferenceService becomes ready."}
- {name: Min Replicas, type: String, default: '-1', description: 'Minimum number of InferenceService replicas'}
- {name: Max Replicas, type: String, default: '-1', description: 'Maximum number of InferenceService replicas'}
outputs:
- {name: InferenceService Status, type: String, description: 'Status JSON output of InferenceService'}
implementation:
container:
image: quay.io/aipipeline/kfserving-component:v0.5.0
command: ['python']
args: [
-u, kfservingdeployer.py,
--action, {inputValue: Action},
--model-name, {inputValue: Model Name},
--model-uri, {inputValue: Model URI},
--canary-traffic-percent, {inputValue: Canary Traffic Percent},
--namespace, {inputValue: Namespace},
--framework, {inputValue: Framework},
--custom-model-spec, {inputValue: Custom Model Spec},
--autoscaling-target, {inputValue: Autoscaling Target},
--service-account, {inputValue: Service Account},
--enable-istio-sidecar, {inputValue: Enable Istio Sidecar},
--output-path, {outputPath: InferenceService Status},
--inferenceservice-yaml, {inputValue: InferenceService YAML},
--watch-timeout, {inputValue: Watch Timeout},
--min-replicas, {inputValue: Min Replicas},
--max-replicas, {inputValue: Max Replicas}
]

View File

@ -1,40 +0,0 @@
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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: Minio Upload
description: |
Minio Upload
inputs:
- {name: bucket_name, description: 'Minio Bucket name'}
- {name: folder_name, description: 'Minio folder name to upload the files'}
- {name: input_path, description: 'Input file/folder name'}
- {name: filename, description: 'Input file name'}
outputs:
- {name: MLPipeline UI Metadata, description: 'MLPipeline UI Metadata output'}
implementation:
container:
image: public.ecr.aws/pytorch-samples/kfp_samples:latest
command: ["python3", "common/minio/upload_to_minio.py"]
args:
- --bucket_name
- {inputValue: bucket_name}
- --folder_name
- {inputValue: folder_name}
- --input_path
- {inputPath: input_path}
- --filename
- {inputValue: filename}
- --mlpipeline_ui_metadata
- {outputPath: MLPipeline UI Metadata}

View File

@ -1,68 +0,0 @@
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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: Inference
description: Makes Inference request.
inputs:
- {name: Host Name, description: 'Host name of inference service'}
- {name: Cookie, description: 'Authentication token'}
- {name: Url, description: 'Prediction endpoing url'}
- {name: Model, description: 'Model name'}
- {name: Inference Type, description: 'Predict or Explain'}
- {name: Input Request, description: 'Input request json'}
outputs:
- {name: MLPipeline UI Metadata, description: 'MLPipeline UI Metadata output'}
implementation:
container:
image: public.ecr.aws/pytorch-samples/alpine:latest
command:
- sh
- -ex
- -c
- |
host_name="$0"
input_request="$1"
output_metadata_path="$2"
cookie="$3"
url="$4"
model="$5"
inference_type="$6"
mkdir -p "$(dirname "$output_metadata_path")"
curl $input_request > /tmp/input.json
curl -v -H "Host: ${host_name}" -H "Cookie: ${cookie}" "${url}/v1/models/${model}:${inference_type}" -d @./tmp/input.json > /tmp/output.json
input=$(echo $input_request | sed -e "s/^/\"## Request: \\\n/" | sed -e "s/$/\"/")
output=$(cat /tmp/output.json | jq '.| tostring' | sed -e "s/^.\{1\}/&## Response: \\\n\`\`\`json\\\n/" -e "s/.$/\\\n\`\`\`\"/")
echo '{
"outputs" : [
{
"storage": "inline",
"source": '"$input"',
"type": "markdown"
},
{
"storage": "inline",
"source": '"$output"',
"type": "markdown"
}
]
}' > "$output_metadata_path"
- {inputValue: Host Name}
- {inputValue: Input Request}
- {outputPath: MLPipeline UI Metadata}
- {inputValue: Cookie}
- {inputValue: Url}
- {inputValue: Model}
- {inputValue: Inference Type}

View File

@ -1,58 +0,0 @@
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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: Create Tensorboard visualization
description: |
Pre-creates Tensorboard visualization for a given Log dir URI.
This way the Tensorboard can be viewed before the training completes.
The output Log dir URI should be passed to a trainer component that will write Tensorboard logs to that directory.
inputs:
- {name: Log dir URI, description: 'Tensorboard log path'}
- {name: Image, default: '', description: 'Tensorboard docker image'}
- {name: Pod Template Spec, default: 'null', description: 'Pod template specification'}
outputs:
- {name: Log dir URI, description: 'Tensorboard log output'}
- {name: MLPipeline UI Metadata, description: 'MLPipeline UI Metadata output'}
implementation:
container:
image: public.ecr.aws/pytorch-samples/alpine:latest
command:
- sh
- -ex
- -c
- |
log_dir="$0"
output_log_dir_path="$1"
output_metadata_path="$2"
pod_template_spec="$3"
image="$4"
mkdir -p "$(dirname "$output_log_dir_path")"
mkdir -p "$(dirname "$output_metadata_path")"
echo "$log_dir" > "$output_log_dir_path"
echo '
{
"outputs" : [{
"type": "tensorboard",
"source": "'"$log_dir"'",
"image": "'"$image"'",
"pod_template_spec": '"$pod_template_spec"'
}]
}
' >"$output_metadata_path"
- {inputValue: Log dir URI}
- {outputPath: Log dir URI}
- {outputPath: MLPipeline UI Metadata}
- {inputValue: Pod Template Spec}
- {inputValue: Image}