Azure / Azure/MachineLearningNotebooks

ML Pipelines DatabricksStep doesn't support Run.get_context()

Đang mở
#1,014 18 bình luận 5 reaction 2 người được giao Được @balapv nhận Xem trên GitHub
ADO Pipelines product-issue
Ngôn ngữ chính
Jupyter Notebook
Star
4.4k
Fork
2.6k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

While using a DatabricksStep I want to get the appropriate Run context so that I can log information to Azure ML.

I thought this might work:
1) Authenticate with AzureMLTokenAuthentication
2) Get an authenticated Workspace -> Experiment -> Run
3) Use the Run.get_context()

Although I can't use the AzureMLTokenAuthentication to authenticate the Workspace.

Can you please provide more information on Azure's intention on how AzureMLTokenAuthentication should even be used?

The only way I've been able to get a run_context from within Databricks during a DatabricksStep is:

```
os.environ['AZUREML_RUN_TOKEN'] = AZUREML_RUN_TOKEN
os.environ['AZUREML_RUN_TOKEN_EXPIRY'] = AZUREML_RUN_TOKEN_EXPIRY
os.environ['AZUREML_RUN_ID'] = AZUREML_RUN_ID
os.environ['AZUREML_ARM_SUBSCRIPTION'] = AZUREML_ARM_SUBSCRIPTION
os.environ['AZUREML_ARM_RESOURCEGROUP'] = AZUREML_ARM_RESOURCEGROUP
os.environ['AZUREML_ARM_WORKSPACE_NAME'] = AZUREML_ARM_WORKSPACE_NAME
os.environ['AZUREML_ARM_PROJECT_NAME'] = AZUREML_ARM_PROJECT_NAME
os.environ['AZUREML_SERVICE_ENDPOINT'] = AZUREML_SERVICE_ENDPOINT

run = Run.get_context(allow_offline=False)
```
Which feels like a hack. How does Azure suggest that someone does this.

Any help is appreciated.

Noel

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 4f99a518-b801-fb1c-4f6a-4a520be5aecc
* Version Independent ID: abc91e79-e6ef-801d-1883-4e0fba418317
* Content: [azureml.core.authentication.AzureMLTokenAuthentication class - Azure Machine Learning Python](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.authentication.azuremltokenauthentication?view=azure-ml-py)
* Content Source: [AzureML-Docset/stable/docs-ref-autogen/azureml-core/azureml.core.authentication.AzureMLTokenAuthentication.yml](https://github.com/MicrosoftDocs/MachineLearning-Python-pr/blob/live/AzureML-Docset/stable/docs-ref-autogen/azureml-core/azureml.core.authentication.AzureMLTokenAuthentication.yml)
* Service: **machine-learning**
* Sub-service: **core**
* GitHub Login: @debfro
* Microsoft Alias: **jmartens**

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.