github.com/pachyderm/pachyderm@v1.13.4/examples/ml/tensorflow/pre-processing_and_generation.json (about)

     1  {
     2    "pipeline": {
     3      "name": "preprocess_images"
     4    },
     5    "description": "A pipeline that pre-processes input images and generates final images by combining the preposessed images with the trained data in the `model` repository.",
     6    "transform": {
     7      "image": "dwhitena/pix2pix",
     8      "cmd": [ "/bin/bash" ],
     9      "stdin": [
    10        "python process.py --input_dir /pfs/input_images --operation resize --output_dir /pfs/out"	
    11      ]
    12    },
    13    "input": {
    14      "pfs": {
    15        "repo": "input_images",
    16        "glob": "/*"
    17      }
    18    }
    19  }
    20  {
    21    "pipeline": {
    22      "name": "generate_images"
    23    },
    24    "transform": {
    25      "image": "dwhitena/pix2pix",
    26      "cmd": [ "/bin/bash" ],
    27      "stdin": [
    28        "for filename in /pfs/preprocess_images/*; do",
    29        "rawname=$(basename $filename)",
    30        "python process-local.py --model_dir /pfs/model --input_file $filename --output_file /pfs/out/$rawname",	
    31        "done"
    32      ]
    33    },
    34    "input": {
    35      "cross": [
    36        {
    37          "pfs": {
    38            "repo": "preprocess_images",
    39            "glob": "/*"
    40          }
    41        },
    42        {
    43          "pfs": {
    44            "repo": "model",
    45            "glob": "/"
    46          }
    47        }
    48      ]
    49    }
    50  }