Azure / Azure/MachineLearningNotebooks

Can't pass DataRerence to DatabricksStep

オープン
#1,608 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Jupyter Notebook
スター
4.4k
フォーク
2.6k
PR マージ指標
30日以内にマージされた PR はありません

説明

When passing a DataReference to my DatabricksStep:

```
day_files = DataReference(datastore=ds,
path_on_datastore='day_files',
data_reference_name='day_files',
)

python_script_name = "calculate_responsible_turnover.py"
source_directory = "./"

calculate_responsible_turnover_step = DatabricksStep(name="calculate_responsible_turnover",
python_script_params=['--data-path', day_files],
inputs=[day_files],
num_workers=1,
python_script_name=python_script_name,
source_directory=source_directory,
run_name='calculate_responsible_turnover',
compute_target=databricks_compute,
allow_reuse=False
)
```

I'm getting the error:

```
Traceback (most recent call last):
File "/opt/project/collect_data/main.py", line 39, in
calculate_responsible_turnover_step = DatabricksStep(name="calculate_responsible_turnover",
File "/opt/conda/lib/python3.8/site-packages/azureml/pipeline/steps/databricks_step.py", line 398, in __init__
super(DatabricksStep, self).__init__(
File "/opt/conda/lib/python3.8/site-packages/azureml/pipeline/core/_databricks_step_base.py", line 385, in __init__
self._params["python_script_params"] = self._encode_string_params(python_script_params)
File "/opt/conda/lib/python3.8/site-packages/azureml/pipeline/core/_databricks_step_base.py", line 578, in _encode_string_params
final_params_list.append(value.replace("|", "|-"))
AttributeError: 'DataReference' object has no attribute 'replace'
```

Seems like the DatabricksStep is expecting a string, but if I typecast my DataReference as a string, it becomes `$AZUREML_DATAREFERENCE_day_files` instead of the actual path. I'm running the following packages:
```
- azureml-sdk==1.34.0
- azureml-core==1.34.0
- azureml-pipeline-core==1.34.0
- azureml-datadrift==1.21.0
- azureml-telemetry==1.23.0
- azure-keyvault-secrets==4.2.0
- azureml-pipeline-steps==1.34.0
```
Any suggestions on how to proceed with this problem?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

azureml/pipeline/core/_databricks_step_base.py の失敗している _encode_string_params 呼び出しと、azureml/pipeline/steps/databricks_step.py の DatabricksStep コンストラクターから始めます。azureml SDK 1.34.0 で例を再現し、次に DataReference を python_script_params に渡すサポート対象の方法を確認して、生成された Databricks step が意図した参照またはパスを受け取ることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
machine-learning
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
32/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。