apiVersion: v1
data:
  defaultTrialTemplate.yaml: |-
    apiVersion: batch/v1
    kind: Job
    spec:
      template:
        spec:
          containers:
            - name: training-container
              image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-a96ff59
              command:
                - "python3"
                - "/opt/mxnet-mnist/mnist.py"
                - "--batch-size=64"
                - "--lr=${trialParameters.learningRate}"
                - "--num-layers=${trialParameters.numberLayers}"
                - "--optimizer=${trialParameters.optimizer}"
          restartPolicy: Never
  enasCPUTemplate: |-
    apiVersion: batch/v1
    kind: Job
    spec:
      template:
        spec:
          containers:
            - name: training-container
              image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu:v1beta1-a96ff59
              command:
                - python3
                - -u
                - RunTrial.py
                - --num_epochs=1
                - "--architecture=\"${trialParameters.neuralNetworkArchitecture}\""
                - "--nn_config=\"${trialParameters.neuralNetworkConfig}\""
          restartPolicy: Never
  pytorchJobTemplate: |-
    apiVersion: "kubeflow.org/v1"
    kind: PyTorchJob
    spec:
      pytorchReplicaSpecs:
        Master:
          replicas: 1
          restartPolicy: OnFailure
          template:
            spec:
              containers:
                - name: pytorch
                  image: gcr.io/kubeflow-ci/pytorch-dist-mnist-test:v1.0
                  imagePullPolicy: Always
                  command:
                    - "python"
                    - "/var/mnist.py"
                    - "--lr=${trialParameters.learningRate}"
                    - "--momentum=${trialParameters.momentum}"
        Worker:
          replicas: 2
          restartPolicy: OnFailure
          template:
            spec:
              containers:
                - name: pytorch
                  image: gcr.io/kubeflow-ci/pytorch-dist-mnist-test:v1.0
                  imagePullPolicy: Always
                  command:
                    - "python"
                    - "/var/mnist.py"
                    - "--lr=${trialParameters.learningRate}"
                    - "--momentum=${trialParameters.momentum}"
kind: ConfigMap
metadata:
  labels:
    app: katib-trial-templates
    app.kubernetes.io/component: katib
    app.kubernetes.io/name: katib-controller
  name: trial-template
  namespace: kubeflow
