apiVersion: v1
data:
  defaultTrialTemplate.yaml: |-
    apiVersion: batch/v1
    kind: Job
    metadata:
      name: {{.Trial}}
      namespace: {{.NameSpace}}
    spec:
      template:
        spec:
          containers:
          - name: {{.Trial}}
            image: docker.io/kubeflowkatib/mxnet-mnist
            command:
            - "python3"
            - "/opt/mxnet-mnist/mnist.py"
            - "--batch-size=64"
            {{- with .HyperParameters}}
            {{- range .}}
            - "{{.Name}}={{.Value}}"
            {{- end}}
            {{- end}}
          restartPolicy: Never
  enasCPUTemplate: |-
    apiVersion: batch/v1
    kind: Job
    metadata:
      name: {{.Trial}}
      namespace: {{.NameSpace}}
    spec:
      template:
        spec:
          containers:
          - name: {{.Trial}}
            image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu
            command:
            - "python3.5"
            - "-u"
            - "RunTrial.py"
            {{- with .HyperParameters}}
            {{- range .}}
            - "--{{.Name}}=\"{{.Value}}\""
            {{- end}}
            {{- end}}
            - "--num_epochs=1"
          restartPolicy: Never
  pytorchJobTemplate: |-
    apiVersion: "kubeflow.org/v1"
    kind: PyTorchJob
    metadata:
      name: {{.Trial}}
      namespace: {{.NameSpace}}
    spec:
     pytorchReplicaSpecs:
      Master:
        replicas: 1
        restartPolicy: OnFailure
        template:
          spec:
            containers:
              - name: pytorch
                image: gcr.io/kubeflow-ci/pytorch-dist-mnist-test:v1.0
                imagePullPolicy: IfNotPresent
                command:
                  - "python"
                  - "/var/mnist.py"
                  {{- with .HyperParameters}}
                  {{- range .}}
                  - "{{.Name}}={{.Value}}"
                  {{- end}}
                  {{- end}}
      Worker:
        replicas: 2
        restartPolicy: OnFailure
        template:
          spec:
            containers:
              - name: pytorch
                image: gcr.io/kubeflow-ci/pytorch-dist-mnist-test:v1.0
                imagePullPolicy: IfNotPresent
                command:
                  - "python"
                  - "/var/mnist.py"
                  {{- with .HyperParameters}}
                  {{- range .}}
                  - "{{.Name}}={{.Value}}"
                  {{- end}}
                  {{- end}}
kind: ConfigMap
metadata:
  labels:
    app: katib-trial-templates
    app.kubernetes.io/component: katib
    app.kubernetes.io/instance: katib-controller-0.8.0
    app.kubernetes.io/managed-by: kfctl
    app.kubernetes.io/name: katib-controller
    app.kubernetes.io/part-of: kubeflow
    app.kubernetes.io/version: 0.8.0
  name: trial-template-labeled
  namespace: kubeflow
