最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure machine learning service - mltable will not load data asset from AzureML - Stack Overflow

programmeradmin1浏览0评论

I am struggling to read a data asset from AzureML into my local python session. My code works up until I use mltable.load() (disguising my inputs with <...>):

    from azure.identity import DefaultAzureCredential
    from azure.ai.ml import MLClient
    import mltable

    ml_client = MLClient(
        credential=DefaultAzureCredential(),
        subscription_id=<subscription_id>,
        resource_group_name=<resource_group_name>,
        workspace_name=<workspace_name>
    )

    data_asset = ml_client.data.get("my_dataset", version="1")
    tbl = mltable.load(f'azureml:/{data_asset.id}')
    data = tbl.to_pandas_dataframe()

The output of data_asset.id is

'/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.MachineLearningServices/workspaces/<workspace_name>/data/my_dataset/versions/1'

The output of tbl = mltable.load(f'azureml:/{data_asset.id}') is KeyError: 'paths':

image of KeyError: 'paths'

The data asset is simply a table queried from a AzureSQL database within the same resource group. I am following the exact guidelines from Azure for loading this datatable for interactive development. Why can't mltable load my data asset? I am using python 3.9 if that makes a difference. Thank you.

发布评论

评论列表(0)

  1. 暂无评论