Open edgBR opened 1 month ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.
Hi, any feedback on this?
Hello. Experiencing the same, while running through the SDKv2 examples - https://github.com/Azure/azureml-examples/blob/main/sdk/python/resources/datastores/datastore.ipynb
{
"name": "ModuleNotFoundError",
"message": "No module named 'azure.ai.ml.entities._datastore.credentials'",
"stack": "---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[7], line 11
4 from azure.ai.ml import command, Input
5 from azure.ai.ml.entities import (
6 AzureBlobDatastore,
7 AzureFileDatastore,
8 AzureDataLakeGen1Datastore,
9 AzureDataLakeGen2Datastore,
10 )
---> 11 from azure.ai.ml.entities._datastore.credentials import (
12 AccountKeyCredentials,
13 SasTokenCredentials,
14 ServicePrincipalCredentials,
15 )
16 from azure.ai.ml.entities import Environment
ModuleNotFoundError: No module named 'azure.ai.ml.entities._datastore.credentials'"
}
I rewrote to
# from azure.ai.ml.entities._datastore.credentials import (
# AccountKeyCredentials,
# SasTokenCredentials,
# ServicePrincipalCredentials,
# )
# added - 16/10/2024 - Luke Wilkins
from azure.ai.ml.entities import (
AccountKeyConfiguration,
SasTokenConfiguration,
ServicePrincipalConfiguration
)
blob_datastore1 = AzureBlobDatastore(
name="lwrwmachinemachinestore",
description="Datastore for lovely MachineMachine.",
account_name="lwrwmachinemachinestore",
container_name="data-container",
credentials=AccountKeyConfiguration(
account_key="xxxxxxxxxxx"
)
# credentials=AccountKeyCredentials(
# account_key="XXXxxxXXXxXXXXxxXXXXXxXXXXXxXxxXxXXXxXXXxXXxxxXXxxXXXxXxXXXxxXxxXXXXxxxxxXXxxxxxxXXXxXXX"
#),
)
ml_client.create_or_update(blob_datastore1)
Confirm dataStore is created via sighting in the portal.
Describe the bug It seems that documentation is incorrect regarding AzureML Datastores as the SDK component doesnt exist
To Reproduce Steps to reproduce the behavior:
Run the following:
It will break in:
Expected behavior I expect the documentation to be correct.