common_options: &common_options
    data:
        throughput:
            reduction_type: "mean"
            regexp: "throughput: *(.*?) samples\/sec"
            skip: 1
        loss:
            reduction_type: "final"
            regexp: 'loss: *(\d*\.\d*)'
        compile_time:
            regexp: "Compiled model in *(.*?) secs"
    output:
        - [samples/sec, 'throughput']
        - [loss, 'loss']
        - [sec, 'compile_time']

config_options: &config_options
    requirements_path: requirements.txt

pytorch_clip_vit_b_32_train_gen_pod16:
    <<: [*common_options, *config_options]
    description:
        PyTorch CLIP_ViT-B-32 8 IPU throughput benchmark using host generated synthetic data.
    cmd: >-
        python3 train.py
            --config CLIP_ViT-B-32_cc3m
            --host_generate_data True
            --epochs 2
            --warmup_epochs 1

pytorch_clip_vit_b_32_train_real_pod16_conv:
    <<: [*common_options, *config_options]
    description:
        PyTorch CLIP_ViT-B-32 8 IPU loss benchmark using cc3m dataset.
    cmd: >-
        python3 train.py
            --config CLIP_ViT-B-32_cc3m
            --wandb
            --wandb_run_name pytorch_clip_vit_b_32_train_real_pod16_conv
            --image_path $DATASETS_DIR/cc3m/images
            --captions_path $DATASETS_DIR/cc3m/img_cap.csv
            --bpe_vocab_path $DATASETS_DIR/bpe_vocabulary/bpe_simple_vocab_16e6.txt.gz
            --checkpoint_output_dir output/ckpt
