유스 케이스 또는 팩시밀리에 대한 세부사항 사용자 정의

마지막 업데이트 날짜: 2024년 12월 05일
유스 케이스 또는 팩시밀리에 대한 세부사항 사용자 정의

AI 유스 케이스에 대한 팩시밀리에서 수집되는 정보를 프로그래밍 방식으로 사용자 정의할 수 있습니다. AI 거버넌스 전략의 일부로 사용자 정의된 패싯 시트를 사용하십시오.

모델 또는 AI 사용 사례 프로그래밍 방식으로 업데이트하기

사용 사례 또는 팩트시트를 추가 정보로 업데이트할 수 있습니다. 예를 들어, 일부 회사에는 모델 유스 케이스 또는 모델 팩트와 함께 제공할 표준 세부사항 세트가 있습니다.

현재 데이터 및 AI 공통 코어 API를 사용하는 사용자 속성을 수정하여 테넌트 수준 자산 유형을 업데이트해야 자산을 업데이트할 수 있습니다.

사용자 정의 자산 유형 업데이트

사용자 정의 자산 유형을 업데이트하려면 다음 단계를 수행하십시오.

  1. ' getcatalogtype ' 메서드에' bss_account_id 쿼리 매개변수를 입력합니다.

  2. model_entry에 대한 속성을 업데이트하는 경우 asset_type을(를) model_entry_user(으)로 제공하십시오. 모델 팩트에 대한 속성을 업데이트하는 경우 asset_type을(를) modelfacts_user(으)로 제공하십시오.

  3. ' asset_type '가 ' modelfacts_user ' 또는 ' model_entry_user'인 ' getcatalogtype ' 메서드를 사용하여 현재 에셋 유형 정의를 검색합니다.

  4. API 문서에 정의된 스키마를 따라 특성 JSON 오브젝트에 추가하여 현재 자산 유형 정의를 사용자 정의 속성으로 업데이트하십시오. 모델 유스 케이스 또는 모델의 사용자 인터페이스에서 보고 편집하기 위해 다음 유형의 속성이 지원됩니다.

    • 문자열
    • 날짜
    • 정수
  5. JSON이 새 속성으로 업데이트되면 ' replaceassettype ' 메서드를 사용하여 변경을 시작합니다. asset_type , bss_account_id및 요청 페이로드를 제공하십시오.

업데이트가 완료되면 AI 유스 케이스 세부사항 페이지 및 모델 세부사항 페이지에서 사용자 정의 속성을 볼 수 있습니다.

예제 1: model_entry_user 자산 유형 검색 및 업데이트

참고:

이 예제는 유스 케이스 사용자 데이터를 업데이트합니다. 동일한 형식을 사용할 수 있지만 modelfacts_user 로 대체하여 모델 factsheet에 대한 세부사항을 검색하고 업데이트할 수 있습니다.

이 curl 명령은 자산 유형 model_entry_user을(를) 검색합니다.

curl -X GET --header 'Accept: application/json' --header "Authorization: ZenApiKey ${MY_TOKEN}"  'https://api.dataplatform.cloud.ibm.com:443/v2/asset_types/model_entry_user?bss_account_id=<bss_account_id>'

이 스니펫은 모델 유스 케이스 사용자 세부사항에 대한 샘플 응답 페이로드입니다.

{
    "description": "The model use case to capture user defined attributes.",
    "fields": [],
    "relationships": [],
    "properties": {},
    "decorates": [{
        "asset_type_name": "model_entry"
    }],
    "global_search_searchable": [],
    "localized_metadata_attributes": {
        "name": {
            "default": "Additional details",
            "en": "Additional details"
        }
    },
    "attribute_only": false,
    "name": "model_entry_user",
    "version": 1,
    "scope": "ACCOUNT"
}

이 curl 명령은 model_entry_user 자산 유형을 업데이트합니다.

curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header "Authorization: ZenApiKey ${MY_TOKEN}"  -d '@requestbody.json' 'https://api.dataplatform.cloud.ibm.com:443/v2/asset_types/model_entry_user?bss_account_id=<bss_account_id>'

requestbody.json 컨텐츠는 다음과 같습니다.

{
    "description": "The model use case to capture user defined attributes.",
    "fields": [],
    "relationships": [],
    "properties": {
        "user_attribute1": {
            "type": "string",
            "description": "User attribute1",
            "placeholder": "User attribute1",
            "is_array": false,
            "required": true,
            "hidden": false,
            "readonly": false,
            "default_value": "None",
            "label": {
                "default": "User attribute1"
            }
        },
        "user_attribute2": {
            "type": "integer",
            "description": "User attribute2",
            "placeholder": "User attribute2",
            "is_array": false,
            "required": true,
            "hidden": false,
            "readonly": false,
            "label": {
                "default": "User attribute2"
            }
        },
        "user_attribute3": {
            "type": "date",
            "description": "User attribute3",
            "placeholder": "User attribute3",
            "is_array": false,
            "required": true,
            "hidden": false,
            "readonly": false,
            "default_value": "None",
            "label": {
                "default": "User attribute3"
            }
        
    }
    "decorates": [{
        "asset_type_name": "model_entry"
    }],
    "global_search_searchable": [],
    "attribute_only": false,
    "localized_metadata_attributes": {
        "name": {
            "default": "Additional details",
            "en": "Additional details"
        }
    }
}

사용자 지정 사실에 대한 표시 순서 지정

"사용자 지정 팩트 정의 만들기" 메서드의 ' Order ' 필드에서 사용자 지정 팩트에 대한 표시 순서를 지정할 수 있습니다. 이를 통해 팩트 시트의 사실 구성을 더욱 효과적으로 제어할 수 있습니다.

사용자 지정 사실에 주문을 할당하려면 다음 단계를 따르세요.

  1. 사용자 지정 팩트 정의 파일을 편집하고 정수가 할당된 주문 필드를 추가하여 주문을 제어합니다. 예를 들면 다음과 같습니다. Python 사용하여 사용자 지정 필드에 주문 할당하기
  2. 이 방법을 사용하여 정의 파일을 로드합니다:
facts_client.assets.create_custom_facts_definitions("Asset_type_definition.csv", overwrite=True)

Python 클라이언트를 사용하여 사용자 세부사항 업데이트

Python 스크립트를 사용하여 자산 유형을 업데이트하고 특성으로 대체할 수도 있습니다. 자세한 내용은 팩트 시트 요소 설명을 참조하세요.

사용자 정의 속성으로 자산 유형 정의를 업데이트한 후 모델 유스 케이스 개요 및 모델 세부사항 페이지에서 해당 속성의 값을 제공할 수 있습니다. 다음 Python API 클라이언트 메소드를 사용하는 사용자 정의 속성으로 값을 업데이트할 수도 있습니다.

모델에 대한 셀 팩트 캡처

데이터 과학자가 노트북에서 모델을 개발할 때 ROC 곡선, 혼동 매트릭스, panda 프로파일링 보고서 또는 모든 셀 실행의 출력과 같은 주요 모델 세부사항에 대한 시각화를 생성합니다. 모델 유스 케이스의 일부로 이러한 팩트를 캡처하려면 AI Factsheets Python 클라이언트 라이브러리에서 ' capture_cell_fact ` 함수를 사용하십시오.

사용자 정의 필드 문제점 해결

필드를 사용자 정의하고 사용자가 사용할 수 있도록 한 후 모델 세부사항의 추가 세부사항 섹션에서 필드를 업데이트하려는 사용자에게 다음 오류가 발생할 수 있습니다.

Update failed. To update an asset attribute, you must be a catalog Admin or an asset owner or member with the Editor role. Ask a catalog Admin to update your catalog role or ask an asset member with the Editor role to add you as a member.

사용자에게 이미 모델에 대한 편집 권한이 있고 여전히 오류 메시지가 표시되는 경우 다음 단계를 수행하여 이를 해결하십시오.

  1. createassetattributenewv2 대한 API 명령을 호출합니다.

  2. 다음 명령과 함께 이 페이로드를 사용하십시오.

    
    {
      "name": "modelfacts_system",
      "entity": {
      }
    }
    

    여기서 asset_idmodel_id입니다. 모델이 있는 project_id 또는 space_id 또는 catalog_id 를 입력하십시오.

자세히 알아보기

프로그래밍 방식으로 인벤토리 작업에 대한 자세한 내용은 IBM_AIGOV_FACTS_CLIENT 문서를 참조하세요.

상위 주제: AI 자산 관리