다음을 통해 공유


관리되는 기능 저장소 문제 해결

이 문서에서는 Azure Machine Learning의 관리되는 기능 저장소에서 발생할 수 있는 일반적인 문제를 해결하는 방법을 알아봅니다.

기능 저장소를 만들고 업데이트할 때 발견된 문제

기능 저장소를 만들거나 업데이트할 때 다음과 같은 문제가 발생할 수 있습니다.

ARM 제한 오류

증상

기능 저장소 만들기 또는 업데이트 실패 오류는 다음과 같이 표시될 수 있습니다.

{
  "error": {
    "code": "TooManyRequests",
    "message": "The request is being throttled as the limit has been reached for operation type - 'Write'. ..",
    "details": [
      {
        "code": "TooManyRequests",
        "target": "Microsoft.MachineLearningServices/workspaces",
        "message": "..."
      }
    ]
  }
}

솔루션

나중에 기능 저장소 만들기/업데이트 작업을 실행합니다. 배포는 여러 단계로 수행되므로 일부 리소스가 이미 있으므로 두 번째 시도가 실패할 수 있습니다. 해당 리소스를 삭제하고 작업을 다시 시작합니다.

중복 구체화 ID ARM ID 문제

처음으로 구체화를 사용하도록 설정하도록 기능 저장소를 업데이트하면 기능 저장소의 일부 이후 업데이트로 인해 이 오류가 발생할 수 있습니다.

증상

SDK/CLI를 사용하여 기능 저장소를 업데이트하면 다음 오류 메시지와 함께 업데이트가 실패합니다.

오류:

{
  "error":{
    "code": "InvalidRequestContent",
    "message": "The request content contains duplicate JSON property names creating ambiguity in paths 'identity.userAssignedIdentities['/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{your-uai}']'. Please update the request content to eliminate duplicates and try again."
  }
}

솔루션

이 문제는 materialization_identity ARM ID 형식의 ARM ID에 관한 것입니다.

Azure UI 또는 SDK에서 사용자 할당 관리 ID의 ARM ID는 소문자 resourcegroups를 사용합니다. 이 예제를 참조하세요.

  • (A): /subscriptions/{sub-id}/resourcegroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{your-uai}

기능 저장소에서 사용자 할당 관리 ID를 materialization_identity로 사용하는 경우 그 ARM ID는 정규화되고 resourceGroups와 함께 저장됩니다. 이 예제를 참조하세요.

  • (B): /subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{your-uai}

업데이트 요청에서 기능 저장소 업데이트를 위해 materialization identity와 일치하는 사용자 할당 ID를 사용할 수 있습니다. ARM ID를 형식(A)으로 사용하는 동안 해당 용도로 해당 관리 ID를 사용하면 업데이트가 실패하고 이전 오류 메시지가 반환됩니다.

이 문제를 해결하려면 사용자 할당 관리 ID ARM ID에서 문자열 resourcegroupsresourceGroups로 바꿉니다. 그런 다음, 기능 저장소 업데이트를 다시 실행합니다.

RBAC 권한 오류

기능 저장소를 만들려면 사용자에게 역할과 User Access Administrator 역할이 Contributor 필요합니다. 작업의 동일한 역할 집합을 포함하는 사용자 지정 역할이 작동합니다. 작업의 이러한 두 역할의 슈퍼 집합도 작동합니다.

증상

사용자에게 필요한 역할이 없으면 배포가 실패합니다. 오류 응답은 다음과 같습니다.

{
  "error": {
    "code": "AuthorizationFailed",
    "message": "The client '{client_id}' with object id '{object_id}' does not have authorization to perform action '{action_name}' over scope '{scope}' or the scope is invalid. If access was recently granted, please refresh your credentials."
  }
}

솔루션

기능 저장소가 Contributor 만들어지는 리소스 그룹의 사용자에게 역할 및 User Access Administrator 역할을 부여합니다. 그런 다음, 사용자에게 배포를 다시 실행하라고 지시합니다.

자세한 내용은 역할 리소스에 필요한 feature store materialization managed identity 사용 권한을 참조하세요.

azure-mgmt-authorization 패키지의 이전 버전은 AzureMLOnBehalfOfCredential에서 작동하지 않습니다.

증상

azureml-examples 리포지토리에서 featurestore_sample 폴더에 제공된 스크립트를 사용하면 setup_storage_uai 이 오류 메시지와 함께 스크립트가 실패합니다.

AttributeError: 'AzureMLOnBehalfOfCredential' object has no attribute 'signed_session'

해결 방법:

설치된 azure-mgmt-authorization 패키지의 버전을 확인하고 최신 버전(3.0.0 이상)을 사용하고 있는지 확인하십시오. 이전 버전(예: 0.61.0)은 작동하지 AzureMLOnBehalfOfCredential않습니다.

기능 집합 사양 만들기 오류

기능 집합 사양의 스키마가 잘못되었습니다.

기능 집합을 기능 저장소에 등록하기 전에 기능 집합 사양을 로컬로 정의하고 <feature_set_spec>.to_spark_dataframe()을 실행하여 유효성을 검사합니다.

증상

사용자가 실행 <feature_set_spec>.to_spark_dataframe()되면 기능 집합 데이터 프레임 스키마가 기능 집합 사양 정의와 일치하지 않는 경우 다양한 스키마 유효성 검사 실패가 발생할 수 있습니다.

예시:

  • 오류 메시지: azure.ai.ml.exceptions.ValidationException: Schema check errors, timestamp column: timestamp is not in output dataframe
  • 오류 메시지: Exception: Schema check errors, no index column: accountID in output dataframe
  • 오류 메시지: ValidationException: Schema check errors, feature column: transaction_7d_count has data type: ColumnType.long, expected: ColumnType.string

솔루션

스키마 유효성 검사 실패 오류를 확인하고 그에 따라 열 이름과 형식 모두에 맞게 기능 집합 사양 정의를 업데이트합니다. 예시:

  • source.timestamp_column.name 타임스탬프 열 이름을 올바르게 정의하도록 속성을 업데이트합니다.
  • 인덱스 index_columns 열을 올바르게 정의하도록 속성을 업데이트합니다.
  • features 기능 열 이름 및 형식을 올바르게 정의하도록 속성을 업데이트합니다.
  • 기능 원본 데이터가 csv 형식이면 CSV 파일이 열 머리글로 생성되었는지 확인합니다.

그런 다음, <feature_set_spec>.to_spark_dataframe()을 다시 실행하여 유효성 검사가 통과되었는지 확인합니다.

SDK에서 기능 집합 사양 infer_schema 을 정의하는 경우 값을 수동으로 입력하는 대신 옵션을 기본 설정 방법으로 자동 채우기 features로 권장합니다. timestamp_columnindex columns는 자동 완성될 수 없습니다.

자세한 내용은 기능 집합 사양 스키마 리소스를 참조하세요.

변환 클래스를 찾을 수 없습니다

증상

사용자가 <feature_set_spec>.to_spark_dataframe()을 실행하면 다음 오류가 반환됩니다. AttributeError: module '<...>' has no attribute '<...>'

예시:

  • AttributeError: module '7780d27aa8364270b6b61fed2a43b749.transaction_transform' has no attribute 'TransactionFeatureTransformer1'

솔루션

기능 변환 클래스는 코드 폴더의 루트 아래에 있는 Python 파일에 그 정의가 있어야 합니다. 코드 폴더에는 다른 파일 또는 하위 폴더가 있을 수 있습니다.

feature_transformation_code.transformation_class 속성 값을 <py file name of the transformation class>.<transformation class name>로 설정합니다.

예를 들어 코드 폴더가 다음과 같고

code/
└── my_transformation_class.py

my_transformation_class.py 파일은 클래스를 MyFeatureTransformer 정의하고

feature_transformation_code.transformation_class 다음을 수행해야 합니다. my_transformation_class.MyFeatureTransformer

코드 폴더의 FileNotFoundError

증상

이 오류는 기능 집합 사양 YAML이 수동으로 만들어지고 SDK에서 기능 집합을 생성하지 않는 경우에 발생할 수 있습니다. 명령

runs <feature_set_spec>.to_spark_dataframe()

반환 오류

FileNotFoundError: [Errno 2] No such file or directory: ....

솔루션

코드 폴더를 확인합니다. 기능 집합 사양 폴더 아래의 하위 폴더여야 합니다. 기능 집합 사양에서 feature_transformation_code.path를 기능 집합 사양 폴더의 상대 경로로 설정합니다. 예시:

feature set spec folder/
├── code/
│ ├── my_transformer.py
│ └── my_orther_folder
└── FeatureSetSpec.yaml

이 예에서 YAML의 feature_transformation_code.path 속성은 ./code여야 합니다

참고 항목

create_feature_set_spec 함수 azureml-featurestore사용하여 FeatureSetSpec python 개체를 만들 때 로컬 폴더를 값으로 feature_transformation_code.path 사용할 수 있습니다. FeatureSetSpec 개체가 대상 폴더에서 기능 집합 사양 yaml을 형성하기 위해 덤프되면 코드 경로가 대상 폴더에 복사되고 feature_transformation_code.path 속성이 사양 yaml에서 업데이트됩니다.

기능 집합 CRUD 오류

잘못된 FeatureStoreEntity로 인해 기능 집합 GET이 실패함

증상

기능 저장소 CRUD 클라이언트를 사용하여 기능 집합(예 fs_client.feature_sets.get(name, version): "')을 가져오는 경우 다음 오류가 발생할 수 있습니다.


Traceback (most recent call last):

  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/azure/ai/ml/operations/_feature_store_entity_operations.py", line 116, in get

    return FeatureStoreEntity._from_rest_object(feature_store_entity_version_resource)

  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/azure/ai/ml/entities/_feature_store_entity/feature_store_entity.py", line 93, in _from_rest_object

    featurestoreEntity = FeatureStoreEntity(

  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/azure/ai/ml/_utils/_experimental.py", line 42, in wrapped

    return func(*args, **kwargs)

  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/azure/ai/ml/entities/_feature_store_entity/feature_store_entity.py", line 67, in __init__

    raise ValidationException(

azure.ai.ml.exceptions.ValidationException: Stage must be Development, Production, or Archived, found None

이 오류는 FeatureStore 구체화 작업에서도 발생할 수 있으며 이 때도 동일한 오류 추적으로 작업이 실패합니다.

솔루션

새 버전의 SDKS로 Notebook 세션 시작

  • azure-ai-ml을 사용할 경우 azure-ai-ml==1.8.0로 업데이트합니다.
  • 기능 저장소 데이터 평면 SDK를 사용할 경우 azureml-featurestore== 0.1.0b2로 업데이트합니다.

Notebook 세션에서 다음 예와 같이 기능 저장소 엔터티를 업데이트하여 해당 stage 속성을 설정합니다.

from azure.ai.ml.entities import DataColumn, DataColumnType
 
account_entity_config = FeatureStoreEntity(

    name="account",

    version="1",

    index_columns=[DataColumn(name="accountID", type=DataColumnType.STRING)],

    stage="Development",

    description="This entity represents user account index key accountID.",

    tags={"data_typ": "nonPII"},

)

poller = fs_client.feature_store_entities.begin_create_or_update(account_entity_config)

print(poller.result())

FeatureStoreEntity를 정의할 때는 그것을 만들 때 사용했던 속성과 일치하도록 속성을 설정합니다. 유일한 차이점은 stage 속성을 추가하는 것입니다.

begin_create_or_update() 호출이 성공적으로 반환되면 다음 feature_sets.get() 호출과 다음 구체화 작업이 성공해야 합니다.

기능 검색 작업 및 쿼리 오류

기능 검색 작업이 실패하면 오류 세부 정보를 확인합니다. 실행 세부 정보 페이지로 이동하여 출력 + 로그 탭을 선택하고 logs/azureml/driver/stdout 파일을 검사합니다.

사용자가 Notebook에서 get_offline_feature() 쿼리를 실행하는 경우 셀 출력에 오류가 직접 표시됩니다.

기능 검색 사양 해상도 오류

증상

기능 검색 쿼리/작업에 다음 오류가 표시됩니다.

  • 잘못된 기능
code: "UserError"
mesasge: "Feature '<some name>' not found in this featureset."
  • 잘못된 기능 저장소 URI
message: "the Resource 'Microsoft.MachineLearningServices/workspaces/<name>' under resource group '<>>resource group name>'->' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix",
code: "ResourceNotFound"
  • 잘못된 기능 집합
code: "UserError"
message: "Featureset with name: <name >and version: <version> not found."

솔루션

작업이 사용하는 feature_retrieval_spec.yaml에서 콘텐츠를 확인합니다. 모든 기능 저장소 이름 확인

  • URI
  • 기능 집합 이름/버전
  • 기능

는 유효하며 기능 저장소에 존재합니다.

기능 저장소에서 기능을 선택하고 기능 검색 사양 YAML 파일을 생성하려면 유틸리티 함수를 사용하는 것이 좋습니다.

이 코드 조각은 generate_feature_retrieval_spec 유틸리티 함수를 사용합니다.

from azureml.featurestore import FeatureStoreClient
from azure.ai.ml.identity import AzureMLOnBehalfOfCredential

featurestore = FeatureStoreClient(
credential = AzureMLOnBehalfOfCredential(),
subscription_id = featurestore_subscription_id,
resource_group_name = featurestore_resource_group_name,
name = featurestore_name
)

transactions_featureset = featurestore.feature_sets.get(name="transactions", version = "1")

features = [
    transactions_featureset.get_feature('transaction_amount_7d_sum'),
    transactions_featureset.get_feature('transaction_amount_3d_sum')
]

feature_retrieval_spec_folder = "./project/fraud_model/feature_retrieval_spec"
featurestore.generate_feature_retrieval_spec(feature_retrieval_spec_folder, features)

모델을 기능 검색 작업에 대한 입력으로 사용할 때 파일 feature_retrieval_spec.yaml을 찾을 수 없습니다.

증상

등록된 모델을 기능 검색 작업 입력으로 사용하는 경우 다음 오류로 작업이 실패합니다.

ValueError: Failed with visit error: Failed with execution error: error in streaming from input data sources
    VisitError(ExecutionError(StreamError(NotFound)))
=> Failed with execution error: error in streaming from input data sources
    ExecutionError(StreamError(NotFound)); Not able to find path: azureml://subscriptions/{sub_id}/resourcegroups/{rg}/workspaces/{ws}/datastores/workspaceblobstore/paths/LocalUpload/{guid}/feature_retrieval_spec.yaml

해결 방법:

기능 검색 단계에 대한 입력으로 모델을 제공하는 경우 그 모델은 모델 아티팩트 폴더 아래에서 검색 사양 YAML 파일을 찾을 것입니다. 그 파일이 없으면 작업이 실패합니다.

이 문제를 해결하려면 모델을 등록하기 전에 모델 아티팩트 폴더의 루트 폴더에 파일을 패키지 feature_retrieval_spec.yaml 합니다.

관찰 데이터는 어떤 기능 값과도 결합되지 않습니다.

증상

사용자가 기능 검색 쿼리/작업을 실행하고 나면 출력 데이터는 기능 값을 가져오지 않습니다. 예를 들어 사용자는 기능 검색 작업을 실행하여 다음 결과와 함께 기능 및 transaction_amount_7d_avg 기능을 검색 transaction_amount_3d_avg 합니다.

transactionID accountID timestamp is_fraud transaction_amount_3d_avg transaction_amount_7d_avg
83870774-7A98-43B... A1055520444618950 2023-02-28 04:34:27 0 null null
25144265-F68B-4FD... A1055520444618950 2023-02-28 10:44:30 0 null null
8899ED8C-B295-43F... A1055520444812380 2023-03-06 00:36:30 0 null null

해결 방법

기능 검색은 특정 시점 조인 쿼리를 수행합니다. 조인 결과가 비어 있으면 다음과 같은 솔루션을 시도해 보세요.

  • 기능 집합 사양 정의에서 temporal_join_lookback 범위를 확장하거나 일시적으로 제거합니다. 이를 통해 특정 시점 조인이 과거를 관찰 이벤트 타임스탬프 이전으로 더(또는 무한히) 되돌아보고 기능 값을 찾을 수 있습니다.
  • 기능 집합 사양 정의에 source.source_delay도 설정되어 있으면 temporal_join_lookback > source.source_delay인지 확인합니다.

이 솔루션들 중 어느 것도 효과가 없으면 기능 저장소에서 기능 집합을 가져오고 <feature_set>.to_spark_dataframe()을 실행하여 기능 인덱스 열과 타임스탬프를 수동으로 검사합니다. 다음과 같은 이유로 실패를 할 수 있습니다.

  • 관찰 데이터의 인덱스 값이 기능 집합 데이터 프레임에 존재하지 않습니다.
  • 관찰 타임스탬프 앞에 타임스탬프 값이 있고는 기능 값이 없습니다.

이러한 경우 그 기능이 오프라인 구체화를 사용하도록 설정했다면 더 많은 기능 데이터를 백필해야 할 수 있습니다.

사용자 또는 관리 ID가 기능 저장소에 대한 적절한 RBAC 권한이 없습니다.

증상:

기능 검색 작업/쿼리가 실패하고 logs/azureml/driver/stdout 파일에 다음 오류 메시지가 표시됩니다.

Traceback (most recent call last):
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/azure/ai/ml/_restclient/v2022_12_01_preview/operations/_workspaces_operations.py", line 633, in get
    raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (AuthorizationFailed) The client 'XXXX' with object id 'XXXX' does not have authorization to perform action 'Microsoft.MachineLearningServices/workspaces/read' over scope '/subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.MachineLearningServices/workspaces/XXXX' or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed

해결 방법:

  1. 기능 검색 작업에서 관리 ID를 사용하는 경우 기능 저장소에 대한 AzureML Data Scientist 역할을 ID에 할당합니다.

  2. 다음의 경우 문제가 발생하면

  • 사용자가 Azure Machine Learning Spark Notebook에서 코드를 실행할 때
  • 그 Notebook이 사용자 고유의 ID를 사용하여 Azure Machine Learning 서비스에 액세스할 때

기능 저장소의 AzureML Data Scientist 역할을 사용자의 Microsoft Entra ID에 할당합니다.

Azure Machine Learning Data Scientist는 권장하는 역할입니다. 사용자는 다음 작업을 통해 자신의 사용자 지정 역할을 만들 수 있습니다.

  • Microsoft.MachineLearningServices/workspaces/datastores/listsecrets/action
  • Microsoft.MachineLearningServices/workspaces/featuresets/read
  • Microsoft.MachineLearningServices/workspaces/read

RBAC 설정에 대한 자세한 내용은 관리되는 네트워크 격리 리소스에 대한 액세스 관리를 참조하세요.

사용자 또는 관리 ID가 원본 스토리지 또는 오프라인 스토리지에서 읽을 수 있는 적절한 RBAC 권한이 없습니다

증상

기능 검색 쿼리 작업/쿼리가 실패하고 logs/azureml/driver/stdout 파일에 다음 오류 메시지가 표시됩니다.

An error occurred while calling o1025.parquet.
: java.nio.file.AccessDeniedException: Operation failed: "This request is not authorized to perform this operation using this permission.", 403, GET, https://{storage}.dfs.core.windows.net/test?upn=false&resource=filesystem&maxResults=5000&directory=datasources&timeout=90&recursive=false, AuthorizationPermissionMismatch, "This request is not authorized to perform this operation using this permission. RequestId:63013315-e01f-005e-577b-7c63b8000000 Time:2023-05-01T22:20:51.1064935Z"
    at org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.checkException(AzureBlobFileSystem.java:1203)
    at org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.listStatus(AzureBlobFileSystem.java:408)
    at org.apache.hadoop.fs.Globber.listStatus(Globber.java:128)
    at org.apache.hadoop.fs.Globber.doGlob(Globber.java:291)
    at org.apache.hadoop.fs.Globber.glob(Globber.java:202)
    at org.apache.hadoop.fs.FileSystem.globStatus(FileSystem.java:2124)

해결 방법:

  • 기능 검색 작업이 관리 ID를 사용하는 경우 원본 스토리지와 오프라인 저장소 스토리지 모두에서 역할을 ID에 할당 Storage Blob Data Reader 합니다.
  • 이 오류는 Notebook이 쿼리를 실행하기 위해 사용자의 ID를 사용하여 Azure Machine Learning 서비스에 액세스할 때 발생합니다. 이 오류를 해결하려면 원본 스토리지 및 오프라인 저장소 스토리지 계정에서 사용자 ID에 Storage Blob Data Reader 역할을 할당합니다.

Storage Blob Data Reader는 최소 권장 액세스 요구 사항입니다. 더 많은 권한을 지닌 Storage Blob Data Contributor 또는 Storage Blob Data Owner와 같은 역할을 할당해도 됩니다.

학습 작업이 내장 기능 검색 구성 요소에 의해 생성된 데이터를 읽지 못함

증상

학습 데이터가 없거나 형식이 잘못되었거나 파서 오류가 있다는 오류 메시지가 표시되면서 학습 작업이 실패합니다.

FileNotFoundError: [Errno 2] No such file or directory
  • 형식이 올바르지 않습니다.
ParserError:

솔루션

기본 제공 기능 검색 구성 요소에는 output_data라는 하나의 출력이 있습니다. 출력 데이터는 uri_folder 데이터 자산입니다. 폴더 구조는 항상 다음과 같습니다.

<training data folder>/
├── data/
│ ├── xxxxx.parquet
│ └── xxxxx.parquet
└── feature_retrieval_spec.yaml

출력 데이터는 항상 parquet 형식입니다. "data" 하위 폴더에서 읽도록 학습 스크립트를 업데이트하고 데이터를 parquet로 읽습니다.

로컬 기능 집합 사양 사용으로 인해 generate_feature_retrieval_spec()이 실패합니다.

증상:

이 Python 코드는 지정된 기능 목록에 대한 기능 검색 사양을 생성합니다.

featurestore.generate_feature_retrieval_spec(feature_retrieval_spec_folder, features)

기능 목록에 로컬 기능 집합 사양에 의해 정의된 기능이 포함되어 있으면 다음 오류 메시지와 함께 generate_feature_retrieval_spec()이 실패합니다.

AttributeError: 'FeatureSetSpec' object has no attribute 'id'

해결 방법:

기능 검색 사양은 기능 저장소에 등록된 기능 집합을 통해서만 생성할 수 있습니다. 이 문제를 해결하려면

  • 로컬 기능 집합 사양을 기능 저장소에 기능 집합으로 등록합니다.
  • 등록된 기능 집합을 가져옵니다.
  • 등록된 기능 집합의 기능만 사용하여 기능 목록을 다시 만듭니다.
  • 새로운 기능 목록을 사용하여 기능 검색 사양 생성

get_offline_features() 쿼리에 시간이 오래 걸립니다

증상:

기능 저장소의 몇 가지 기능을 사용하여 학습 데이터를 생성하기 위해 get_offline_features를 실행하는 데 시간이 오래 걸립니다.

솔루션:

다음 구성을 확인합니다.

  • 쿼리에 사용된 각 기능 집합이 기능 집합 사양에서 설정되었는지 temporal_join_lookback 확인합니다. 값을 더 작은 값으로 설정합니다.
  • 관찰 데이터 프레임의 크기 및 타임스탬프 창이 큰 경우 드라이버 및 실행기의 크기(메모리 및 코어)를 늘리도록 Notebook 세션(또는 작업)을 구성합니다. 그리고 실행기 수를 늘립니다.

기능 구체화 작업 오류

기능 구체화 작업이 실패할 경우 다음 단계에 따라 작업 실패 세부 정보를 확인합니다.

  1. 기능 저장소 페이지(https://ml.azure.com/featureStore/{your-feature-store-name} )로 이동합니다.
  2. feature set 탭으로 이동하여 관련 기능 집합을 선택하고 기능 집합 세부 정보 페이지로 이동합니다.
  3. 기능 집합 세부 정보 페이지에서 Materialization jobs 탭을 선택한 다음, 실패한 작업을 선택하여 작업 세부 정보 보기에서 엽니다.
  4. 작업 세부 정보 보기의 Properties 카드 아래에서 작업 상태 및 오류 메시지를 검토합니다.
  5. Outputs + logs 탭으로 이동한 다음, logs\azureml\driver\stdout 파일에서 stdout 파일을 찾을 수도 있습니다.

수정을 적용한 후 백필 구체화 작업을 수동으로 트리거하여 수정이 작동하는지 확인할 수 있습니다.

잘못된 오프라인 저장소 구성

증상

logs/azureml/driver/stdout 파일에서 다음 오류 메시지와 함께 구체화 작업이 실패합니다.

Caused by: Status code: -1 error code: null error message: InvalidAbfsRestOperationExceptionjava.net.UnknownHostException: adlgen23.dfs.core.windows.net
java.util.concurrent.ExecutionException: Operation failed: "The specified resource name contains invalid characters.", 400, HEAD, https://{storage}.dfs.core.windows.net/{container-name}/{fs-id}/transactions/1/_delta_log?upn=false&action=getStatus&timeout=90

솔루션

SDK를 사용하여 기능 저장소에 정의된 오프라인 저장소 대상을 확인합니다.


from azure.ai.ml import MLClient
from azure.ai.ml.identity import AzureMLOnBehalfOfCredential

fs_client = MLClient(AzureMLOnBehalfOfCredential(), featurestore_subscription_id, featurestore_resource_group_name, featurestore_name)

featurestore = fs_client.feature_stores.get(name=featurestore_name)
featurestore.offline_store.target

기능 저장소의 UI 개요 페이지에서 오프라인 저장소 대상을 확인할 수도 있습니다. 저장소와 컨테이너가 모두 존재하고 대상의 형식이 다음과 같은지 확인합니다.

/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.Storage/storageAccounts/{storage}/blobServices/default/containers/{container-name}

구체화 ID에 기능 저장소에 대한 적절한 RBAC 권한이 없습니다

증상:

logs/azureml/driver/stdout 파일의 다음 오류 메시지와 함께 구체화 작업이 실패합니다.

Traceback (most recent call last):
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/azure/ai/ml/_restclient/v2022_12_01_preview/operations/_workspaces_operations.py", line 633, in get
    raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (AuthorizationFailed) The client 'XXXX' with object id 'XXXX' does not have authorization to perform action 'Microsoft.MachineLearningServices/workspaces/read' over scope '/subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.MachineLearningServices/workspaces/XXXX' or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed

해결 방법:

기능 저장소의 Azure Machine Learning Data Scientist 역할을 기능 저장소의 구체화 ID(사용자가 할당한 관리 ID)에 할당합니다.

Azure Machine Learning Data Scientist는 권장하는 역할입니다. 다음 작업을 통해 고유한 사용자 지정 역할을 만들 수 있습니다.

  • Microsoft.MachineLearningServices/workspaces/datastores/listsecrets/action
  • Microsoft.MachineLearningServices/workspaces/featuresets/read
  • Microsoft.MachineLearningServices/workspaces/read

자세한 내용은 역할 리소스에 필요한 feature store materialization managed identity 사용 권한을 참조하세요.

구체화 ID에 스토리지에서 읽을 수 있는 적절한 RBAC 권한이 없습니다

증상

logs/azureml/driver/stdout 파일의 다음 오류 메시지와 함께 구체화 작업이 실패합니다.

An error occurred while calling o1025.parquet.
: java.nio.file.AccessDeniedException: Operation failed: "This request is not authorized to perform this operation using this permission.", 403, GET, https://{storage}.dfs.core.windows.net/test?upn=false&resource=filesystem&maxResults=5000&directory=datasources&timeout=90&recursive=false, AuthorizationPermissionMismatch, "This request is not authorized to perform this operation using this permission. RequestId:63013315-e01f-005e-577b-7c63b8000000 Time:2023-05-01T22:20:51.1064935Z"
    at org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.checkException(AzureBlobFileSystem.java:1203)
    at org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.listStatus(AzureBlobFileSystem.java:408)
    at org.apache.hadoop.fs.Globber.listStatus(Globber.java:128)
    at org.apache.hadoop.fs.Globber.doGlob(Globber.java:291)
    at org.apache.hadoop.fs.Globber.glob(Globber.java:202)
    at org.apache.hadoop.fs.FileSystem.globStatus(FileSystem.java:2124)

해결 방법:

기능 저장소의 구체화 ID(사용자가 할당한 관리 ID)에 원본 스토리지의 Storage Blob Data Reader 역할을 할당합니다.

Storage Blob Data Reader는 최소 권장 액세스 요구 사항입니다. 예를 들어 Storage Blob Data Contributor 더 많은 권한을 가진 역할을 할당할 Storage Blob Data Owner수도 있습니다.

RBAC 구성에 대한 자세한 내용은 역할 리소스에 필요한 feature store materialization managed identity 사용 권한을 참조하세요.

구체화 ID에 오프라인 저장소에 데이터를 쓸 수 있는 적절한 RBAC 권한이 없습니다.

증상

logs/azureml/driver/stdout 파일의 다음 오류 메시지와 함께 구체화 작업이 실패합니다.

An error occurred while calling o1162.load.
: java.util.concurrent.ExecutionException: java.nio.file.AccessDeniedException: Operation failed: "This request is not authorized to perform this operation using this permission.", 403, HEAD, https://featuresotrestorage1.dfs.core.windows.net/offlinestore/fs_xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_fsname/transactions/1/_delta_log?upn=false&action=getStatus&timeout=90
    at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:306)
    at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:293)
    at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
    at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:135)
    at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2410)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2380)
    at com.google.common.cache.LocalCache$S

솔루션

원본 스토리지의 Storage Blob Data Reader 역할을 기능 저장소의 구체화 ID(사용자 할당 관리 ID)에 할당합니다.

Storage Blob Data Contributor는 최소 권장 액세스 요구 사항입니다. 더 많은 권한(예: Storage Blob Data Owner)을 사용하여 역할을 할당할 수도 있습니다.

RBAC 구성에 대한 자세한 내용은 역할 리소스에 필요한 feature store materialization managed identity 사용 권한을 참조하세요.

작업 출력을 Notebook으로 스트리밍하면 오류가 발생합니다

증상:

기능 저장소 CRUD 클라이언트를 사용하여 구체화 작업 결과를 Notebook fs_client.jobs.stream("<job_id>")으로 스트리밍하는 경우 SDK 호출이 오류와 함께 실패합니다.

HttpResponseError: (UserError) A job was found, but it is not supported in this API version and cannot be accessed.

Code: UserError

Message: A job was found, but it is not supported in this API version and cannot be accessed.

해결 방법:

구체화 작업이 만들어지면(예: 백필 호출을 통해) 작업이 제대로 초기화되는 데 몇 초 정도 걸릴 수 있습니다. 몇 초 후에 jobs.stream() 명령을 다시 실행합니다. 이렇게 하면 문제가 해결됩니다.

잘못된 Spark 구성

증상:

구체화 작업이 다음 오류 메시지와 함께 실패합니다.

Synapse job submission failed due to invalid spark configuration request

{

"Message":"[..] Either the cores or memory of the driver, executors exceeded the SparkPool Node Size.\nRequested Driver Cores:[4]\nRequested Driver Memory:[36g]\nRequested Executor Cores:[4]\nRequested Executor Memory:[36g]\nSpark Pool Node Size:[small]\nSpark Pool Node Memory:[28]\nSpark Pool Node Cores:[4]"

}

해결 방법:

기능 집합의 materialization_settings.spark_configuration{}을 업데이트합니다. 이러한 매개 변수는 메모리 크기 양과 인스턴스 유형이 정의 materialization_settings.resource한 것보다 작은 총 코어 값 수를 모두 사용하는지 확인합니다.

spark.driver.cores spark.driver.memory spark.executor.cores spark.executor.memory

예를 들어 인스턴스 유형 standard_e8s_v3 이 Spark 구성은 유효한 옵션 중 하나입니다.


transactions_fset_config.materialization_settings = MaterializationSettings(

    offline_enabled=True,

    resource = MaterializationComputeResource(instance_type="standard_e8s_v3"),

    spark_configuration = {

        "spark.driver.cores": 4,

        "spark.driver.memory": "36g",

        "spark.executor.cores": 4,

        "spark.executor.memory": "36g",

        "spark.executor.instances": 2

    },

    schedule = None,

)

fs_poller = fs_client.feature_sets.begin_create_or_update(transactions_fset_config)

다음 단계