1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| preprocess = dsl.ContainerOp( name='preprocess', image='gcr.io/cloud-training-demos/babyweight-pipeline-bqtocsv:latest', arguments=[ '--project', project, '--mode', 'cloud', '--bucket', bucket ], file_outputs={'bucket': '/output.txt'} ) hparam_train = dsl.ContainerOp( name='hypertrain', image='gcr.io/cloud-training-demos/babyweight-pipeline-hypertrain:latest', arguments=[ preprocess.outputs['bucket'] ], file_outputs={'jobname': '/output.txt'} ) train_tuned = dsl.ContainerOp( name='traintuned', image='gcr.io/cloud-training-demos/babyweight-pipeline-traintuned-trainer:latest', arguments=[ hparam_train.outputs['jobname'], bucket ], file_outputs={'train': '/output.txt'} ) train_tuned.set_memory_request('2G') train_tuned.set_cpu_request('1') deploy_cmle = dsl.ContainerOp( name='deploycmle', image='gcr.io/cloud-training-demos/babyweight-pipeline-deploycmle:latest', arguments=[ train_tuned.outputs['train'], 'babyweight', 'mlp' ], file_outputs={ 'model': '/model.txt', 'version': '/version.txt' } )
|