لا تنشئ متاجر بيانات Azure التعلم الآلي موارد حساب التخزين الأساسية. بدلا من ذلك، يربطون حساب تخزين موجود لاستخدام Azure التعلم الآلي. لا يتطلب هذا مخازن بيانات Azure التعلم الآلي. إذا كان لديك حق الوصول إلى البيانات الأساسية، يمكنك استخدام عناوين URL للتخزين مباشرة.
from azure.ai.ml.entities import AzureBlobDatastore
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureBlobDatastore(
name="",
description="",
account_name="",
container_name=""
)
ml_client.create_or_update(store)
from azure.ai.ml.entities import AzureBlobDatastore
from azure.ai.ml.entities import AccountKeyConfiguration
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureBlobDatastore(
name="blob_protocol_example",
description="Datastore pointing to a blob container using https protocol.",
account_name="mytestblobstore",
container_name="data-container",
protocol="https",
credentials=AccountKeyConfiguration(
account_key="XXXxxxXXXxXXXXxxXXXXXxXXXXXxXxxXxXXXxXXXxXXxxxXXxxXXXxXxXXXxxXxxXXXXxxxxxXXxxxxxxXXXxXXX"
),
)
ml_client.create_or_update(store)
from azure.ai.ml.entities import AzureBlobDatastore
from azure.ai.ml.entities import SasTokenConfiguration
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureBlobDatastore(
name="blob_sas_example",
description="Datastore pointing to a blob container using SAS token.",
account_name="mytestblobstore",
container_name="data-container",
credentials=SasTokenConfiguration(
sas_token= "?xx=XXXX-XX-XX&xx=xxxx&xxx=xxx&xx=xxxxxxxxxxx&xx=XXXX-XX-XXXXX:XX:XXX&xx=XXXX-XX-XXXXX:XX:XXX&xxx=xxxxx&xxx=XXxXXXxxxxxXXXXXXXxXxxxXXXXXxxXXXXXxXXXXxXXXxXXxXX"
),
)
ml_client.create_or_update(store)
إنشاء ملف YAML التالي (تأكد من تحديث القيم المناسبة):
# my_blob_datastore.yml
$schema: https://azuremlschemas.azureedge.net/latest/azureBlob.schema.json
name: my_blob_ds # add your datastore name here
type: azure_blob
description: here is a description # add a datastore description here
account_name: my_account_name # add the storage account name here
container_name: my_container_name # add the storage container name here
أنشئ مخزن بيانات التعلم الآلي في CLI:
az ml datastore create --file my_blob_datastore.yml
إنشاء ملف YAML هذا (تأكد من تحديث القيم المناسبة):
from azure.ai.ml.entities import AzureDataLakeGen2Datastore
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureDataLakeGen2Datastore(
name="",
description="",
account_name="",
filesystem=""
)
ml_client.create_or_update(store)
from azure.ai.ml.entities import AzureDataLakeGen2Datastore
from azure.ai.ml.entities._datastore.credentials import ServicePrincipalCredentials
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureDataLakeGen2Datastore(
name="adls_gen2_example",
description="Datastore pointing to an Azure Data Lake Storage Gen2.",
account_name="mytestdatalakegen2",
filesystem="my-gen2-container",
credentials=ServicePrincipalCredentials(
tenant_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
client_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
client_secret= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
),
)
ml_client.create_or_update(store)
إنشاء ملف YAML هذا (تحديث القيم):
# my_adls_datastore.yml
$schema: https://azuremlschemas.azureedge.net/latest/azureDataLakeGen2.schema.json
name: adls_gen2_credless_example
type: azure_data_lake_gen2
description: Credential-less datastore pointing to an Azure Data Lake Storage Gen2.
account_name: mytestdatalakegen2
filesystem: my-gen2-container
أنشئ مخزن بيانات التعلم الآلي في CLI:
az ml datastore create --file my_adls_datastore.yml
إنشاء ملف YAML هذا (تحديث القيم):
# my_adls_datastore.yml
$schema: https://azuremlschemas.azureedge.net/latest/azureDataLakeGen2.schema.json
name: adls_gen2_example
type: azure_data_lake_gen2
description: Datastore pointing to an Azure Data Lake Storage Gen2.
account_name: mytestdatalakegen2
filesystem: my-gen2-container
credentials:
tenant_id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
client_id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
client_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
أنشئ مخزن بيانات التعلم الآلي في CLI:
az ml datastore create --file my_adls_datastore.yml
from azure.ai.ml.entities import AzureFileDatastore
from azure.ai.ml.entities import AccountKeyConfiguration
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureFileDatastore(
name="file_example",
description="Datastore pointing to an Azure File Share.",
account_name="mytestfilestore",
file_share_name="my-share",
credentials=AccountKeyConfiguration(
account_key= "XXXxxxXXXxXXXXxxXXXXXxXXXXXxXxxXxXXXxXXXxXXxxxXXxxXXXxXxXXXxxXxxXXXXxxxxxXXxxxxxxXXXxXXX"
),
)
ml_client.create_or_update(store)
from azure.ai.ml.entities import AzureFileDatastore
from azure.ai.ml.entities import SasTokenConfiguration
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureFileDatastore(
name="file_sas_example",
description="Datastore pointing to an Azure File Share using SAS token.",
account_name="mytestfilestore",
file_share_name="my-share",
credentials=SasTokenConfiguration(
sas_token="?xx=XXXX-XX-XX&xx=xxxx&xxx=xxx&xx=xxxxxxxxxxx&xx=XXXX-XX-XXXXX:XX:XXX&xx=XXXX-XX-XXXXX:XX:XXX&xxx=xxxxx&xxx=XXxXXXxxxxxXXXXXXXxXxxxXXXXXxxXXXXXxXXXXxXXXxXXxXX"
),
)
ml_client.create_or_update(store)
from azure.ai.ml.entities import AzureDataLakeGen1Datastore
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureDataLakeGen1Datastore(
name="",
store_name="",
description="",
)
ml_client.create_or_update(store)
from azure.ai.ml.entities import AzureDataLakeGen1Datastore
from azure.ai.ml.entities._datastore.credentials import ServicePrincipalCredentials
from azure.ai.ml import MLClient
ml_client = MLClient.from_config()
store = AzureDataLakeGen1Datastore(
name="adls_gen1_example",
description="Datastore pointing to an Azure Data Lake Storage Gen1.",
store_name="mytestdatalakegen1",
credentials=ServicePrincipalCredentials(
tenant_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
client_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
client_secret= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
),
)
ml_client.create_or_update(store)
إنشاء ملف YAML هذا (تحديث القيم):
# my_adls_datastore.yml
$schema: https://azuremlschemas.azureedge.net/latest/azureDataLakeGen1.schema.json
name: alds_gen1_credless_example
type: azure_data_lake_gen1
description: Credential-less datastore pointing to an Azure Data Lake Storage Gen1.
store_name: mytestdatalakegen1
أنشئ مخزن بيانات التعلم الآلي في CLI:
az ml datastore create --file my_adls_datastore.yml
إنشاء ملف YAML هذا (تحديث القيم):
# my_adls_datastore.yml
$schema: https://azuremlschemas.azureedge.net/latest/azureDataLakeGen1.schema.json
name: adls_gen1_example
type: azure_data_lake_gen1
description: Datastore pointing to an Azure Data Lake Storage Gen1.
store_name: mytestdatalakegen1
credentials:
tenant_id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
client_id: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
client_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
أنشئ مخزن بيانات التعلم الآلي في CLI:
az ml datastore create --file my_adls_datastore.yml
إنشاء مخزن بيانات OneLake (Microsoft Fabric) (معاينة)
يصف هذا القسم خيارات مختلفة لإنشاء مخزن بيانات OneLake. يعد مخزن بيانات OneLake جزءا من Microsoft Fabric. في هذا الوقت، يدعم Azure التعلم الآلي الاتصال ب Microsoft Fabric Lakehouse artifacts التي تتضمن مجلدات / ملفات واختصارات Amazon S3. لمزيد من المعلومات حول Lakehouse، تفضل بزيارة What is a lakehouse في Microsoft Fabric.
يتطلب إنشاء مخزن بيانات OneLake
نقطة النهاية
اسم مساحة عمل النسيج أو GUID
اسم البيانات الاصطناعية أو GUID
معلومات من مثيل Microsoft Fabric الخاص بك. تصف لقطات الشاشة الثلاث هذه استرداد موارد المعلومات المطلوبة هذه من مثيل Microsoft Fabric:
اسم مساحة عمل OneLake
في مثيل Microsoft Fabric، يمكنك العثور على معلومات مساحة العمل كما هو موضح في لقطة الشاشة هذه. يمكنك استخدام قيمة GUID أو "اسم مألوف" لإنشاء مخزن بيانات Azure التعلم الآلي OneLake.
نقطة نهاية OneLake
توضح لقطة الشاشة هذه كيف يمكنك العثور على معلومات نقطة النهاية في مثيل Microsoft Fabric:
اسم البيانات الاصطناعية OneLake
توضح لقطة الشاشة هذه كيف يمكنك العثور على معلومات البيانات الاصطناعية في مثيل Microsoft Fabric. توضح لقطة الشاشة أيضا كيف يمكنك إما استخدام قيمة GUID أو "اسم مألوف" لإنشاء مخزن بيانات Azure التعلم الآلي OneLake: