vmware / vSphere-machine-learning-extension

vSphere Machine Learning Extension
https://vmware.github.io/vSphere-machine-learning-extension/
Apache License 2.0
21 stars 20 forks source link

NameError: name 'data_download_from_url' is not defined #138

Open tiansiyuan opened 7 months ago

tiansiyuan commented 7 months ago

Describe the bug

On https://github.com/vmware/vSphere-machine-learning-extension/blob/main/examples/end_to_end/helmet_object_detection/pipelines/README.md

When I run:

@dsl.pipeline(
    name = 'helmet detection pipeline',
    description = 'pipeline to detect helmet')
def generate_pipeline(dataurl, datapath, epoch, device, workers_num):
    comp1 = data_download_from_url(dataurl, datapath)
    comp2 = data_process(comp1)
    comp3 = model_train(comp2, epoch, device, workers_num)

if __name__ == '__main__':
  import kfp.compiler as compiler
  compiler.Compiler().compile(generate_pipeline, './generated_yaml_files/helmet_detection_pipeline' + '.yaml')

Reproduction steps

Follow the steps on https://github.com/vmware/vSphere-machine-learning-extension/blob/main/examples/end_to_end/helmet_object_detection/pipelines/README.md

Expected behavior

A file called helmet_detection_pipeline.yaml is created.

Additional context

No response

tiansiyuan commented 7 months ago

Add:

data_download_from_url(dataurl, datapath)

above:

return dsl.ContainerOp(
        name = 'Download Data',

and add 4 spaces in front of return