---
tf2_unet_train_real_pod4:
  description: |
    Training unet 1 replica on 4 IPUs
  cmd: >-
    python3 main.py
      --nb-ipus-per-replica 4
      --micro-batch-size 1
      --gradient-accumulation-count 24
      --train
      --augment
      --learning-rate 0.0024
      --kfold 1
      --num-epochs 200
      --data-dir $DATASETS_DIR/tif
      --benchmark
  data:
    throughput:
      regexp: 'throughput: *(.*?) samples\/sec'
      skip: 2
    loss:
      reduction_type: "final"
      regexp: 'loss: *(\d*\.\d*)'
    celoss:
      reduction_type: "final"
      regexp: 'ce_loss: *(\d*\.\d*)'
  output:
    - [samples/sec, 'throughput']
    - [loss, 'loss']
    - [CE-loss, 'celoss']

tf2_unet_infer_gen_pod4:
  description: |
    Inference on unet on IPUM-2000 (4 copies)
  parameters:
    batchsize: 1,2
  cmd: >-
    mpirun
      --np 4
      --bind-to socket
      -x POPLAR_RUNTIME_OPTIONS
      -x POPLAR_ENGINE_OPTIONS
    python3 main.py
      --nb-ipus-per-replica 1
      --micro-batch-size {batchsize}
      --steps-per-execution 400
      --infer
      --host-generated-data
      --benchmark
  data:
    throughput:
      regexp: 'throughput: *(.*?) samples\/sec'
  output:
    - [samples/sec, 'throughput']
  env:
    POPLAR_ENGINE_OPTIONS: '{"debug.retainDebugInformation":"true"}'
