-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add component.yaml to every ibm-components #984
Merged
Merged
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 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: 'Kubernetes Cluster - Create secret' | ||
description: | | ||
Create secret to store pipeline credentials on Kubernetes Cluster | ||
inputs: | ||
- {name: token, description: 'Required. GitHub token for accessing private repository'} | ||
- {name: url, description: 'Required. GitHub raw path for accessing the credential file'} | ||
- {name: name, description: 'Required. Secret Name to be stored in Kubernetes'} | ||
outputs: | ||
- {name: secret_name, description: 'Kubernetes secret name'} | ||
implementation: | ||
container: | ||
image: docker.io/aipipeline/wml-config:latest | ||
command: ['python3'] | ||
args: [ | ||
/app/config.py, | ||
--token, {inputValue: token}, | ||
--url, {inputValue: url}, | ||
--name, {inputValue: name} | ||
] | ||
fileOutputs: | ||
secret_name: /tmp/ai-pipeline-creds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 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: 'Seldon Core - Serve Model' | ||
description: | | ||
Serve Machine Learning and Deep Learning Models remotely as web service using Seldon Core | ||
inputs: | ||
- {name: model_id, description: 'Required. Model training_id from Fabric for Deep Learning'} | ||
- {name: deployment_name, description: 'Required. Deployment name for the seldon service'} | ||
- {name: model_class_name, description: 'PyTorch model class name', default: 'ModelClass'} | ||
- {name: model_class_file, description: 'File that contains the PyTorch model class', default: 'model_class.py'} | ||
- {name: serving_image, description: 'Model serving images', default: 'aipipeline/seldon-pytorch:0.1'} | ||
outputs: | ||
- {name: output, description: 'Model Serving status'} | ||
implementation: | ||
container: | ||
image: docker.io/aipipeline/ffdl-serve:latest | ||
command: ['python'] | ||
args: [ | ||
-u, serve.py, | ||
--model_id, {inputValue: model_id}, | ||
--deployment_name, {inputValue: deployment_name}, | ||
--model_class_name, {inputValue: model_class_name}, | ||
--model_class_file, {inputValue: model_class_file}, | ||
--serving_image, {inputValue: serving_image} | ||
] | ||
fileOutputs: | ||
output: /tmp/deployment_result.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 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: 'Fabric for Deep Learning - Train Model' | ||
description: | | ||
Train Machine Learning and Deep Learning Models remotely using Fabric for Deep Learning | ||
inputs: | ||
- {name: model_def_file_path, description: 'Required. Path for model training code in object storage'} | ||
- {name: manifest_file_path, description: 'Required. Path for model manifest definition in object storage'} | ||
outputs: | ||
- {name: output, description: 'Model training_id'} | ||
implementation: | ||
container: | ||
image: docker.io/aipipeline/ffdl-train:latest | ||
command: ['python'] | ||
args: [ | ||
-u, train.py, | ||
--model_def_file_path, {inputValue: model_def_file_path}, | ||
--manifest_file_path, {inputValue: manifest_file_path} | ||
] | ||
fileOutputs: | ||
output: /tmp/training_id.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 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: 'Watson Machine Learning - Deploy Model' | ||
description: | | ||
Deploy stored model on Watson Machine Learning as a web service. | ||
inputs: | ||
- {name: model_uid, description: 'Required. UID for the Watson Machine Learning model'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the UID for stored model? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the Watson store component output will be passed to this field as model UID. |
||
- {name: model_name, description: 'Required. Model Name on Watson Machine Learning'} | ||
- {name: scoring_payload, description: 'Required. Sample Payload file name in the object storage'} | ||
outputs: | ||
- {name: output, description: 'Link to the deployed model web service'} | ||
implementation: | ||
container: | ||
image: docker.io/aipipeline/wml-deploy:latest | ||
command: ['python3'] | ||
args: [ | ||
/app/wml-deploy.py, | ||
--model-uid, {inputValue: model_uid}, | ||
--model-name, {inputValue: model_name}, | ||
--scoring-payload, {inputValue: scoring_payload} | ||
] | ||
fileOutputs: | ||
output: /tmp/output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 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: 'Watson Machine Learning - Store model' | ||
description: | | ||
Store and persistent trained model on Watson Machine Learning. | ||
inputs: | ||
- {name: run_uid, description: 'Required. UID for the Watson Machine Learning training-runs'} | ||
- {name: model_name, description: 'Required. Model Name to store on Watson Machine Learning'} | ||
outputs: | ||
- {name: model_uid, description: 'UID for the stored model on Watson Machine Learning'} | ||
implementation: | ||
container: | ||
image: docker.io/aipipeline/wml-store:latest | ||
command: ['python3'] | ||
args: [ | ||
/app/wml-store.py, | ||
--run-uid, {inputValue: run_uid}, | ||
--model-name, {inputValue: model_name} | ||
] | ||
fileOutputs: | ||
model_uid: /tmp/model_uid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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: 'Watson Machine Learning - Train Model' | ||
description: | | ||
Train Machine Learning and Deep Learning Models in the Cloud using Watson Machine Learning | ||
inputs: | ||
- {name: train_code, description: 'Required. Code for training ML/DL models'} | ||
- {name: execution_command, description: 'Required. Execution command to start the model training.'} | ||
- {name: config, description: 'Required. Credential configfile is properly created.'} | ||
- {name: framework, description: 'ML/DL Model Framework', default: 'tensorflow'} | ||
- {name: framework_version, description: 'Model Framework version', default: '1.5'} | ||
- {name: runtime, description: 'Model Code runtime language', default: 'python'} | ||
- {name: runtime_version, description: 'Model Code runtime version', default: '3.5'} | ||
- {name: run_definition, description: 'Name for the Watson Machine Learning training definition', default: 'python-tensorflow-definition'} | ||
- {name: run_name, description: 'Name for the Watson Machine Learning training-runs', default: 'python-tensorflow-run'} | ||
outputs: | ||
- {name: run_uid, description: 'UID for the Watson Machine Learning training-runs'} | ||
implementation: | ||
container: | ||
image: docker.io/aipipeline/wml-train:latest | ||
command: ['python3'] | ||
args: [ | ||
/app/wml-train.py, | ||
--config, {inputValue: config}, | ||
--train-code, {inputValue: train_code}, | ||
--execution-command, {inputValue: execution_command}, | ||
--framework, {inputValue: framework}, | ||
--framework-version, {inputValue: framework_version}, | ||
--runtime, {inputValue: runtime}, | ||
--runtime-version, {inputValue: runtime_version}, | ||
--run-definition, {inputValue: run_definition}, | ||
--run-name, {inputValue: run_name} | ||
] | ||
fileOutputs: | ||
run_uid: /tmp/run_uid |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this specific to PyTorch models? Should we call this 'Seldon Core - Serve PyTorch Model' ? Or make it mroe generic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. The component container itself could be more generic, but maybe this component.yaml implementation is more specific for PyTorch model. Let me rename the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done