0

The problem with below code is that currently it does not run because of error in line 27:

raise ValueError("Unexpected input type: %s" % type(input)) ValueError: Unexpected input type: <class 'azureml.pipeline.core.graph.PipelineParameter'>

If I uncomment second data_path_pipeline_param, everything runs as it should. I do not really get why it expects DataPathComputeBinding to be passed.

    datastore = Datastore(workspace=ws, name="my-datastore")
    data_path = DataPath(datastore=datastore, path_on_datastore='input_data')
    data_path_pipeline_param = PipelineParameter(name="input_data", default_value=data_path)
    # data_path_pipeline_param = (PipelineParameter(name="input_data", default_value=datapath),
    #                             DataPathComputeBinding(mode='mount'))

    verify_datastores_step = PythonScriptStep(
        name='Save file to datastores',
        source_directory='verify_datastores_step',
        script_name='save_to_datastores.py',
        arguments=["--path", data_path_pipeline_param],
        inputs=[data_path_pipeline_param],
        runconfig=pipeline_run_config,
        allow_reuse=False

    )
h00jraq
  • 85
  • 1
  • 8

1 Answers1

0

The "inputs" parameter is only taking in these types of data:

 :param inputs: A list of input port bindings.
        :type inputs: list[typing.Union[azureml.pipeline.core.graph.InputPortBinding,
                        azureml.data.data_reference.DataReference,
                        azureml.pipeline.core.PortDataReference,
                        azureml.pipeline.core.builder.PipelineData,
                        azureml.pipeline.core.pipeline_output_dataset.PipelineOutputFileDataset,
                        azureml.pipeline.core.pipeline_output_dataset.PipelineOutputTabularDataset,
                        azureml.data.dataset_consumption_config.DatasetConsumptionConfig]]

This is taken from documentation code from PythonScriptStep(). With only PipelineParameter you are not defining how you are sending data to the compute, you are not defining if you are using download/mount mode.

pips9
  • 1
  • 1