次の方法で共有


DataPath クラス

データストア内のデータへのパスを表します。

DataPath オブジェクトによって表されるパスは、ディレクトリまたはデータ成果物 (BLOB、ファイル) を指すことができます。 DataPath は、パイプライン ステップの実行中にデータを使用する方法を定義する DataPathComputeBinding クラスと組み合わせて使用されます。 DataPath は、 PipelineParameterを使用してパイプラインの送信中に変更できます。

DataPath を初期化します。

コンストラクター

DataPath(datastore=None, path_on_datastore=None, name=None)

パラメーター

名前 説明
datastore

[必須]参照するデータストア。

規定値: None
path_on_datastore
str

データ参照用バッキング ストレージの相対パス。

規定値: None
name
str, <xref:optional>

DataPath の省略可能な名前。

規定値: None
datastore
必須

[必須]参照するデータストア。

path_on_datastore
必須
str

データ参照用バッキング ストレージの相対パス。

name
必須
str, <xref:optional>

DataPath の省略可能な名前。

注釈

次の例では、dataPath を作成し、 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')

完全なサンプルは次から入手できます https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-showcasing-datapath-and-pipelineparameter.ipynb

メソッド

create_data_reference

この DataPath と指定された DataPathComputeBinding を使用して、DataReference オブジェクトを作成します。

create_from_data_reference

DataReference から DataPath を作成します。

create_data_reference

この DataPath と指定された DataPathComputeBinding を使用して、DataReference オブジェクトを作成します。

create_data_reference(data_reference_name=None, datapath_compute_binding=None)

パラメーター

名前 説明
data_reference_name
str

作成するデータ参照の名前。

規定値: None
datapath_compute_binding

[必須]データ参照の作成に使用するデータ パス コンピューティング バインド。

規定値: None

戻り値

説明

DataReference オブジェクト。

create_from_data_reference

DataReference から DataPath を作成します。

static create_from_data_reference(data_reference)

パラメーター

名前 説明
data_reference
必須

[必須]データ パスの作成に使用するデータ参照。

戻り値

説明

DataPath オブジェクト。

属性

datastore_name

データストアの名前を取得します。

戻り値

説明

名前。

path_on_datastore

データストアのパスを取得します。

戻り値

説明

パス。