# 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 Model - FfDL'
description: |
  Train Machine Learning and Deep Learning Models remotely using Fabric for Deep Learning
metadata:
  annotations: {platform: 'OpenSource'}
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},
      --output_training_id_path, {outputPath: output}
    ]
