DataPath Class
Represents a path to data in a datastore.
The path represented by DataPath object can point to a directory or a data artifact (blob, file). DataPath is used in combination with the DataPathComputeBinding class, which defines how the data is consumed during pipeline step execution. A DataPath can be modified at during pipeline submission with the PipelineParameter.
Initialize DataPath.
- Inheritance
-
builtins.objectDataPath
Constructor
DataPath(datastore=None, path_on_datastore=None, name=None)
Parameters
- datastore
- Union[AbstractAzureStorageDatastore, AzureDataLakeDatastore]
[Required] The Datastore to reference.
- path_on_datastore
- str
The relative path in the backing storage for the data reference.
- datastore
- Union[AbstractAzureStorageDatastore, AzureDataLakeDatastore]
[Required] The Datastore to reference.
Remarks
The following example shows how to work create a DataPath and pass in arguments to it using PipelineParameter.
def_blob_store = ws.get_default_datastore()
print("Default datastore's name: {}".format(def_blob_store.name))
data_path = DataPath(datastore=def_blob_store, path_on_datastore='sample_datapath1')
datapath1_pipeline_param = PipelineParameter(name="input_datapath", default_value=data_path)
datapath_input = (datapath1_pipeline_param, DataPathComputeBinding(mode='mount'))
string_pipeline_param = PipelineParameter(name="input_string", default_value='sample_string1')
Full sample is available from https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-showcasing-datapath-and-pipelineparameter.ipynb
Methods
create_data_reference |
Create a DataReference object using this DataPath and the given DataPathComputeBinding. |
create_from_data_reference |
Create a DataPath from a DataReference. |
create_data_reference
Create a DataReference object using this DataPath and the given DataPathComputeBinding.
create_data_reference(data_reference_name=None, datapath_compute_binding=None)
Parameters
- datapath_compute_binding
- DataPathComputeBinding
[Required] The data path compute binding to use to create the data reference.
Returns
A DataReference object.
Return type
create_from_data_reference
Create a DataPath from a DataReference.
static create_from_data_reference(data_reference)
Parameters
Returns
A DataPath object.
Return type
Attributes
datastore_name
path_on_datastore
Feedback
Submit and view feedback for