CLI(v2) 기능 저장소 YAML 스키마
적용 대상: Azure CLI ml 확장 v2(현재)
참고 항목
이 문서에 자세히 설명된 YAML 구문은 최신 버전의 ML CLI v2 확장에 대한 JSON 스키마를 기반으로 합니다. 이 구문은 최신 버전의 ML CLI v2 확장에서만 작동하도록 보장됩니다. https://azuremlschemasprod.azureedge.net/에서 이전 확장 버전에 대한 스키마를 찾을 수 있습니다.
YAML 구문
키 | 형식 | 설명 | 허용된 값 | Default value |
---|---|---|---|---|
$schema | string | YAML 스키마입니다. Azure Machine Learning VS Code 확장을 사용하여 YAML 파일을 제작하는 경우 파일 맨 위에 $schema를 포함하여 스키마 및 리소스 완료를 호출할 수 있습니다. | ||
name | string | 필수입니다. 기능 저장소의 이름입니다. | ||
compute_runtime | 개체 | 구체화 작업에 사용되는 컴퓨팅 런타임 구성입니다. | ||
compute_runtime.spark_runtime_version | string | Azure Machine Learning Spark 런타임 버전입니다. | 3.4 | 3.4 |
offline_store | 개체 | |||
offline_store.type | string | Offline_store가 제공되는 경우 필수입니다. 오프라인 저장소의 형식입니다. Data Lake Gen2 형식의 스토리지만 지원됩니다. | azure_data_lake_gen2 | |
offline_store.target | string | Offline_store가 제공되는 경우 필수입니다. /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Storage/storageAccounts/<account>/blobServices/default/containers/<container> 형식의 Datalake Gen2 스토리지 URI입니다. |
||
online_store | 개체 | |||
online_store.type | string | online_store 제공된 경우 필요합니다 . 온라인 스토어의 유형입니다. redis 캐시만 지원됩니다. | Redis | |
online_store.target | string | online_store 제공된 경우 필요합니다 . Redis Cache URI 형식입니다 /subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.Cache/Redis/<redis-name> . |
||
materialization_identity | 개체 | 구체화 작업에 사용되는 사용자 할당 관리 ID입니다. 기능 저장소 서비스, 데이터 원본 및 오프라인 스토리지에 액세스하는 데 필요한 역할을 이 ID에 부여해야 합니다. | ||
materialization_identity.client_id | string | 사용자 할당 관리 ID의 클라이언트 ID입니다. | ||
materialization_identity.resource_id | string | 사용자 할당 관리 ID의 리소스 ID입니다. | ||
materialization_identity.principal_id | string | 사용자 할당 관리 ID의 주체 ID입니다. | ||
description | string | 기능 저장소에 대한 설명입니다. | ||
tags | 개체 | 기능 저장소에 대한 태그 사전입니다. | ||
display_name | string | 스튜디오 UI에 기능 저장소의 표시 이름입니다. 리소스 그룹 내에서 고유하지 않을 수 있습니다. | ||
location | string | 기능 저장소의 위치입니다. | 리소스 그룹 위치입니다. | |
resource_group | string | 기능 저장소가 포함된 리소스 그룹입니다. 리소스 그룹이 없으면 새 그룹이 만들어집니다. |
다른 작업 영역 속성을 포함할 수 있습니다.
설명
Azure Machine Learning 기능 저장소 작업 영역을 관리하는 데 az ml feature-store
명령을 사용할 수 있습니다.
예제
예제는 예제 GitHub 리포지토리에서 사용할 수 있습니다. 몇 가지 일반적인 예는 다음과 같습니다.
YAML 기본
$schema: http://azureml/sdk-2-0/FeatureStore.json
name: mktg-feature-store
location: eastus
오프라인 저장소 구성이 포함된 YAML
$schema: http://azureml/sdk-2-0/FeatureStore.json
name: mktg-feature-store
compute_runtime:
spark_runtime_version: 3.2
offline_store:
type: azure_data_lake_gen2
target: /subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.Storage/storageAccounts/<account_name>/blobServices/default/containers/<container_name>
materialization_identity:
client_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
resource_id: /subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<uai-name>
# Many of workspace parameters will also be supported:
location: eastus
display_name: marketing feature store
tags:
foo: bar
YAML을 사용하여 CLI에서 온라인 저장소 구성
$schema: http://azureml/sdk-2-0/FeatureStore.json
name: mktg-feature-store
compute_runtime:
spark_runtime_version: 3.4
online_store:
type: redis
target: "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.Cache/Redis/<redis-name>"
materialization_identity:
client_id: 00001111-aaaa-2222-bbbb-3333cccc4444
principal_id: aaaaaaaa-bbbb-cccc-1111-222222222222
resource_id: /subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<uai-name>
# Many of workspace parameters will also be supported:
location: eastus
display_name: marketing feature store
tags:
foo: bar
Python을 사용하여 CLI에서 온라인 저장소 구성
redis_arm_id = f"/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Cache/Redis/{redis_name}"
online_store = MaterializationStore(type="redis", target=redis_arm_id)
fs = FeatureStore(
name=featurestore_name,
location=location,
online_store=online_store,
)
# wait for feature store creation
fs_poller = ml_client.feature_stores.begin_create(fs)
# move the feature store to a YAML file
yaml_path = root_dir + "/featurestore/featurestore_with_online.yaml"
fs.dump(yaml_path)